Skip to content

Commit 1a45a6c

Browse files
committed
fix(separator): improve css #30
1 parent 9c3a379 commit 1a45a6c

2 files changed

Lines changed: 6 additions & 14 deletions

File tree

src/tedi/components/misc/separator/separator.module.scss

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ $dot-colors: (
7070
}
7171
}
7272

73-
%separator-dotted-base {
73+
.tedi-separator--dotted {
7474
&::before {
7575
position: absolute;
7676
content: '';
@@ -85,10 +85,6 @@ $dot-colors: (
8585
}
8686
}
8787

88-
.tedi-separator--dotted {
89-
@extend %separator-dotted-base;
90-
}
91-
9288
.tedi-separator--dot-only {
9389
position: relative;
9490
display: inline-block;
@@ -145,7 +141,7 @@ $dot-colors: (
145141
right: 0;
146142
left: 0;
147143
margin: auto;
148-
} @else if $pos == end {
144+
} @else {
149145
right: 0;
150146
left: auto;
151147
}
@@ -157,7 +153,7 @@ $dot-colors: (
157153
top: 0;
158154
bottom: 0;
159155
margin: auto 0;
160-
} @else if $pos == end {
156+
} @else {
161157
top: auto;
162158
bottom: 0;
163159
}
@@ -226,15 +222,11 @@ $dot-colors: (
226222
&::before {
227223
background-color: var(--general-surface-primary);
228224
border-style: solid;
229-
border-width: var(--separator-thickness, 1px);
225+
border-width: var(--separator-thickness);
230226
}
231227

232228
@each $name, $color in $dot-colors {
233-
&.tedi-separator--#{$name}::before {
234-
z-index: 10;
235-
border-color: $color;
236-
}
237-
229+
&.tedi-separator--#{$name}::before,
238230
&.tedi-separator--dotted-#{$name}::before {
239231
z-index: 10;
240232
border-color: $color;

src/tedi/components/misc/separator/separator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export interface SeparatorSharedProps {
3838
isStretched?: boolean;
3939
/**
4040
* Semantic color token
41-
* @default 'primary'
41+
* @default primary
4242
*/
4343
color?: 'primary' | 'secondary' | 'accent';
4444
/**

0 commit comments

Comments
 (0)