Skip to content

Commit

Permalink
#3710 - Fixed issue with unnecessary padding on first and last items …
Browse files Browse the repository at this point in the history
…of divided and relaxed lists
  • Loading branch information
jlukic committed Feb 19, 2016
1 parent 44837fa commit f10577c
Showing 1 changed file with 22 additions and 15 deletions.
37 changes: 22 additions & 15 deletions src/definitions/elements/list.less
Original file line number Diff line number Diff line change
Expand Up @@ -732,12 +732,16 @@ ol.ui.horizontal.list li:before,
.ui.divided.horizontal.list {
margin-left: 0em;
}
.ui.divided.horizontal.list > .item:not(:first-child) {
padding-left: @horizontalDividedSpacing;
}
.ui.divided.horizontal.list > .item:not(:last-child) {
padding-right: @horizontalDividedSpacing;
}
.ui.divided.horizontal.list > .item {
border-top: none;
border-left: @dividedBorder;
margin: 0em;
padding-left: @horizontalDividedSpacing;
padding-right: @horizontalDividedSpacing;
line-height: @horizontalDividedLineHeight;
}
.ui.horizontal.divided.list > .item:first-child {
Expand Down Expand Up @@ -845,31 +849,34 @@ ol.ui.horizontal.list li:before,
Relaxed
--------------------*/

.ui.relaxed.list:not(.horizontal) > .item {
.ui.relaxed.list:not(.horizontal) > .item:not(:first-child) {
padding-top: @relaxedItemVerticalPadding;
padding-bottom: @relaxedItemVerticalPadding;
}
.ui.relaxed.list:not(.horizontal) .list > .item {
padding-top: @relaxedChildItemVerticalPadding;
padding-bottom: @relaxedChildItemVerticalPadding;
.ui.relaxed.list:not(.horizontal) > .item:not(:last-child) {
padding-bottom: @relaxedItemVerticalPadding;
}
.ui.horizontal.relaxed.list > .item {
.ui.horizontal.relaxed.list .list > .item:not(:first-child),
.ui.horizontal.relaxed.list > .item:not(:first-child) {
padding-left: @relaxedHorizontalPadding;
}
.ui.horizontal.relaxed.list .list > .item:not(:last-child),
.ui.horizontal.relaxed.list > .item:not(:last-child) {
padding-right: @relaxedHorizontalPadding;
}

/* Very Relaxed */
.ui[class*="very relaxed"].list:not(.horizontal) > .item {
.ui[class*="very relaxed"].list:not(.horizontal) > .item:not(:first-child) {
padding-top: @veryRelaxedItemVerticalPadding;
padding-bottom: @veryRelaxedItemVerticalPadding;
}
.ui[class*="very relaxed"].list:not(.horizontal) .list > .item {
padding-top: @veryRelaxedChildItemVerticalPadding;
padding-bottom: @veryRelaxedChildItemVerticalPadding;
.ui[class*="very relaxed"].list:not(.horizontal) > .item:not(:last-child) {
padding-bottom: @veryRelaxedItemVerticalPadding;
}
.ui.horizontal[class*="very relaxed"].list .list > .item,
.ui.horizontal[class*="very relaxed"].list > .item {
.ui.horizontal[class*="very relaxed"].list .list > .item:not(:first-child),
.ui.horizontal[class*="very relaxed"].list > .item:not(:first-child) {
padding-left: @veryRelaxedHorizontalPadding;
}
.ui.horizontal[class*="very relaxed"].list .list > .item:not(:last-child),
.ui.horizontal[class*="very relaxed"].list > .item:not(:last-child) {
padding-right: @veryRelaxedHorizontalPadding;
}

Expand Down

0 comments on commit f10577c

Please sign in to comment.