Skip to content

Commit 3200a25

Browse files
committed
CSS lint fixes for modules in Social/Shares and highlighter component
1 parent 2d8174a commit 3200a25

2 files changed

Lines changed: 34 additions & 35 deletions

File tree

‎src/components/Social/Shares/index.module.css‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.container {}
2-
31
.button:hover {
42
transform: translateY(-1px);
53
}

‎src/styles/components/socialHighlighter.css‎

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@ share-highlight {
1717
}
1818

1919
:where(highlighter-element) {
20-
position: relative;
21-
display: inline-block;
2220
cursor: pointer;
21+
display: inline-block;
22+
position: relative;
23+
2324
--highlight-bg: #bfdbfe;
2425
--highlight-bg-hover: #93c5fd;
2526
--highlight-text: inherit;
26-
--dialog-bg: #ffffff;
27-
--dialog-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
27+
--dialog-bg: #fff;
28+
--dialog-shadow: 0 10px 15px -3px rgb(0 0 0 / 10%), 0 4px 6px -4px rgb(0 0 0 / 10%);
2829
--button-hover: #f3f4f6;
2930
}
3031

@@ -35,28 +36,28 @@ share-highlight {
3536
}
3637

3738
:where(highlighter-element) .highlighter__wrapper {
38-
position: relative;
3939
display: inline-flex;
4040
flex-direction: column;
41+
position: relative;
4142
}
4243

4344
:where(highlighter-element) .highlighter__trigger {
44-
display: inline-flex;
4545
background: transparent;
4646
border: none;
47-
padding: 0;
48-
margin: 0;
49-
font: inherit;
5047
color: inherit;
5148
cursor: inherit;
49+
display: inline-flex;
50+
font: inherit;
51+
margin: 0;
52+
padding: 0;
5253
text-align: left;
5354
}
5455

5556
:where(highlighter-element) .highlighter__content {
56-
color: var(--highlight-text);
5757
background-color: var(--highlight-bg);
58-
padding: 0.125rem 0.25rem;
5958
border-radius: 0.25rem;
59+
color: var(--highlight-text);
60+
padding: 0.125rem 0.25rem;
6061
transition: background-color 0.2s ease;
6162
}
6263

@@ -66,41 +67,41 @@ share-highlight {
6667
}
6768

6869
:where(highlighter-element) .share-dialog {
69-
display: none;
70-
position: absolute;
71-
bottom: calc(100% + 0.75rem);
72-
left: 50%;
73-
transform: translateX(-50%);
7470
background-color: var(--dialog-bg);
7571
border-radius: 0.5rem;
76-
padding: 0.5rem;
72+
bottom: calc(100% + 0.75rem);
7773
box-shadow: var(--dialog-shadow);
78-
z-index: 50;
74+
display: none;
75+
left: 50%;
76+
padding: 0.5rem;
77+
position: absolute;
78+
transform: translateX(-50%);
7979
white-space: nowrap;
80+
z-index: 50;
8081
}
8182

8283
:where(highlighter-element) .share-dialog[aria-hidden="false"] {
8384
display: block;
8485
}
8586

8687
:where(highlighter-element) .share-dialog__buttons {
88+
align-items: center;
8789
display: flex;
8890
gap: 0.25rem;
89-
align-items: center;
9091
}
9192

9293
:where(highlighter-element) .share-button {
93-
display: flex;
9494
align-items: center;
95-
justify-content: center;
96-
width: 2.5rem;
97-
height: 2.5rem;
95+
background-color: transparent;
9896
border: none;
9997
border-radius: 0.375rem;
100-
background-color: transparent;
10198
cursor: pointer;
102-
transition: background-color 0.2s ease, transform 0.1s ease;
99+
display: flex;
100+
height: 2.5rem;
101+
justify-content: center;
103102
padding: 0.5rem;
103+
transition: background-color 0.2s ease, transform 0.1s ease;
104+
width: 2.5rem;
104105
}
105106

106107
:where(highlighter-element) .share-button:hover {
@@ -118,27 +119,27 @@ share-highlight {
118119
}
119120

120121
:where(highlighter-element) .share-icon {
121-
width: 1.25rem;
122+
fill: currentcolor;
122123
height: 1.25rem;
123-
fill: currentColor;
124+
width: 1.25rem;
124125
}
125126

126127
:where(highlighter-element) .copy-button {
127-
margin-left: 0.25rem;
128128
border-left: 1px solid #e5e7eb;
129+
margin-left: 0.25rem;
129130
padding-left: 0.75rem;
130131
}
131132

132133
:where(highlighter-element) .share-dialog__arrow {
133-
position: absolute;
134+
border-left: 0.5rem solid transparent;
135+
border-right: 0.5rem solid transparent;
136+
border-top: 0.5rem solid var(--dialog-bg);
134137
bottom: -0.375rem;
138+
height: 0;
135139
left: 50%;
140+
position: absolute;
136141
transform: translateX(-50%);
137142
width: 0;
138-
height: 0;
139-
border-left: 0.5rem solid transparent;
140-
border-right: 0.5rem solid transparent;
141-
border-top: 0.5rem solid var(--dialog-bg);
142143
}
143144

144145
@media (prefers-color-scheme: dark) {

0 commit comments

Comments
 (0)