-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-101: Portal Nav Mobile - Use Mixin
- New CSS plugin test for nested @extend's. - New mixin "mobile button". - Use mixin for mobile button styles in header.
- Loading branch information
1 parent
9b39ed8
commit ebeebe5
Showing
4 changed files
with
83 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
taccsite_cms/static/site_cms/css/src/_imports/tools/x-mobile-button.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
Mobile Button (or Link) | ||
Styles to lay out button icon, text, and toggle in a compressed area. | ||
%x-mobile-button--toggle-on-side - Support toggle positioned on side of button | ||
Styleguide Tools.ExtendsAndMixins.MobileButton | ||
*/ | ||
|
||
/* WARNING: A button must have `display: (inline-)flex` set externally */ | ||
/* FAQ: Why not set `display: flex` here? | ||
- It may break a button conditionally dependent on `display: none`. | ||
- It would be overridden if button needs `display: inline-flex`. | ||
- It makes user aware of the complexity of `display` and `flex`. | ||
*/ | ||
|
||
|
||
|
||
/* Base */ | ||
|
||
%x-mobile-button { | ||
/* FAQ: The flex properties require `display` of `flex` or `inline-flex` */ | ||
/* display: flex; *//* set this externally */ | ||
|
||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
|
||
|
||
/* Elements */ | ||
|
||
%x-mobile-button__text { | ||
font-family: var(--global-font-family--sans); | ||
font-size: 10px; /* WARNING: Do not use `rem` until `html { 62.5%; }` */ | ||
text-align: center; | ||
text-transform: uppercase; | ||
font-weight: env(--medium); | ||
} | ||
|
||
|
||
|
||
/* Modifiers */ | ||
|
||
%x-mobile-button--toggle-on-side { | ||
@extend %x-mobile-button; | ||
|
||
/* FAQ: A height is required to force toggle to wrap */ | ||
/* height: 60px; *//* set this externally */ | ||
|
||
flex-wrap: wrap; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters