Skip to content

Commit

Permalink
Use %placeholder and @extend on button mixins to see if it makes code…
Browse files Browse the repository at this point in the history
… less repetitive (#347)

* testing using %placeholder and @extend on button component

* add placeholder directory in utilities directory; move %button-base there under /components subdirectory
  • Loading branch information
yvonnetangsu authored and Joe Knox committed Mar 20, 2019
1 parent 172b197 commit 69d949f
Show file tree
Hide file tree
Showing 13 changed files with 190 additions and 260 deletions.
265 changes: 100 additions & 165 deletions core/css/decanter.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/scss/components/cta/_cta.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
//

.su-cta {
@include cta;
@extend %cta-base;
}
18 changes: 15 additions & 3 deletions core/scss/utilities/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// Functions
//
// Programmatic procedure or routine to help making writing code or declaring
// something easier and more seamlesss.
// something easier and more seamless.
//
// Weight: -40
//
Expand All @@ -37,13 +37,25 @@
//
// Style guide: Mixins

//
// Placeholders
//
// Placeholders are reusable blocks of base CSS styles that can be used to reduce repetitiveness
// by using `@extend %placeholder;`.
// Placeholder styles do not show up in the compiled CSS file until a selector extends them.
//
// Weight: -30
//
// Style guide: Placeholders

// Load order convention exception
//
// The convention for importing files in index.scss files is to import in
// alphabetical order. This file intentionally breaks that convetion, as
// alphabetical order. This file intentionally breaks that convention, as
// variables need to be imported before functions and mixins.

@import
'variables/index',
'functions/index',
'mixins/index';
'mixins/index',
'placeholders/index';
Loading

0 comments on commit 69d949f

Please # to comment.