Skip to content

Commit

Permalink
feat(message): support centered variant
Browse files Browse the repository at this point in the history
This PR adds a centered or center aligned as well as a right aligned variant to the message component just like many other components already support.
  • Loading branch information
lubber-de authored Dec 19, 2020
1 parent 1f0334e commit 48c4716
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
22 changes: 20 additions & 2 deletions src/definitions/collections/message.less
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,12 @@


/* Icon */
.ui.message > .icons,
.ui.message > i.icon {
.ui.icon.message > .icons,
.ui.icon.message > i.icon {
margin-right: @iconDistance;
&:last-child {
margin: 0 0 0 @iconDistance;
}
}

/* Close Icon */
Expand Down Expand Up @@ -170,6 +173,21 @@
/*******************************
Variations
*******************************/
& when (@variationMessageCentered) {
.ui.centered.message,
.ui.center.aligned.message {
text-align: center;
justify-content: center;
& > .content {
flex: 0 0 auto;
}
}
}
& when (@variationMessageRightAligned) {
.ui.right.aligned.message {
text-align: right;
}
}

& when (@variationMessageCompact) {
/*--------------
Expand Down
2 changes: 2 additions & 0 deletions src/themes/default/globals/variation.variables
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@
@variationMessageIcon: true;
@variationMessageFloating: true;
@variationMessageConsequences: true;
@variationMessageCentered: true;
@variationMessageRightAligned: true;
@variationMessageSizes: @variationAllSizes;

/* Table */
Expand Down

0 comments on commit 48c4716

Please sign in to comment.