Skip to content

Commit 79582b2

Browse files
authored
feat(segment): seamless variant
enhanced the new left/right attached segment (#2683) by having borders removed using a dedicated seamless class. The previous approach removed the borders as well but "attached" does not remove them in vertical usage, so this is consistent now. In addition seamless also works for vertical segments This PR also fixes the wrong terminology (a left attached has to remove the right border and vices versa to be consistent of having a top attached having the bottom border removed)
1 parent 16dfb7e commit 79582b2

File tree

3 files changed

+27
-8
lines changed

3 files changed

+27
-8
lines changed

src/definitions/collections/grid.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1974,10 +1974,10 @@
19741974

19751975
& when (@variationGridAttached) {
19761976
.ui.grid .left.attached.column {
1977-
padding-left: 0;
1977+
padding-right: 0;
19781978
}
19791979
.ui.grid .right.attached.column {
1980-
padding-right: 0;
1980+
padding-left: 0;
19811981
}
19821982
}
19831983

src/definitions/elements/segment.less

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@
727727
border: @attachedBorder;
728728
}
729729
}
730-
.ui.attached:not(.message):not(.text) + .ui.attached.segment:not(.top) {
730+
.ui.attached:not(.message):not(.text) + .ui.attached.segment:not(.top):not([class*="left attached"]):not([class*="right attached"]) {
731731
border-top: none;
732732
}
733733

@@ -761,13 +761,31 @@
761761
.ui.tab.segment[class*="bottom attached"]:last-child {
762762
margin-bottom: @verticalMargin;
763763
}
764-
.ui.ui[class*="left attached"].segment {
765-
border-left: none;
764+
.ui[class*="left attached"].segment {
765+
margin-right: 0;
766+
}
767+
.ui[class*="right attached"].segment {
766768
margin-left: 0;
767769
}
768-
.ui.ui[class*="right attached"].segment {
769-
border-right: none;
770-
margin-right: 0;
770+
& when (@variationSegmentSeamless) {
771+
.ui.seamless.attached.segment {
772+
&:not(.top):not(.bottom):not([class*="right attached"]):not([class*="left attached"]) {
773+
border-top: none;
774+
border-bottom: none;
775+
}
776+
&.top {
777+
border-bottom: none;
778+
}
779+
&.bottom {
780+
border-top: none;
781+
}
782+
&[class*="left attached"] {
783+
border-right: none;
784+
}
785+
&[class*="right attached"] {
786+
border-left: none;
787+
}
788+
}
771789
}
772790
}
773791

src/themes/default/globals/variation.variables

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@
233233
@variationSegmentSecondary: true;
234234
@variationSegmentTertiary: true;
235235
@variationSegmentAttached: true;
236+
@variationSegmentSeamless: true;
236237
@variationSegmentFitted: true;
237238
@variationSegmentScrolling: true;
238239
@variationSegmentScrollingShort: true;

0 commit comments

Comments
 (0)