Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2844 from uswds/dw-consolidate-mixins
Move public mixins into mixins folder
- Loading branch information
Showing
20 changed files
with
152 additions
and
153 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
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
14 changes: 14 additions & 0 deletions
14
src/stylesheets/core/mixins/_add-checkbox-placeholder.scss
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,14 @@ | ||
@mixin add-checkbox-placeholder { | ||
$placeholder-width: units(3); | ||
$placeholder-margin: units(0.5); | ||
|
||
text-indent: ($placeholder-width + $placeholder-margin) * -1; | ||
|
||
&::before { | ||
content: ' '; | ||
display: inline-block; | ||
height: units(1.5); | ||
margin-right: $placeholder-margin; | ||
width: $placeholder-width; | ||
} | ||
} |
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,7 @@ | ||
@mixin add-success-mark { | ||
&::before { | ||
@include add-background-svg('correct9'); | ||
background-position: 100%; | ||
background-size: 100%; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@mixin button-disabled { | ||
@include add-knockout-font-smoothing; | ||
background-color: color('disabled'); | ||
color: color('white'); | ||
pointer-events: none; | ||
|
||
&:hover, | ||
&.usa-button-hover, | ||
&:active, | ||
&.usa-button-active, | ||
&:focus, | ||
&.usa-focus { | ||
background-color: color('disabled'); | ||
border: 0; | ||
box-shadow: none; | ||
} | ||
} |
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,3 @@ | ||
@mixin embed-container ($height, $width) { | ||
padding-bottom: percentage($height/$width); | ||
} |
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,17 @@ | ||
@mixin external-link($external-link, $external-link-hover) { | ||
&::after { | ||
background: url('#{$theme-image-path}/#{$external-link}.png') no-repeat 0 0; | ||
background: url('#{$theme-image-path}/#{$external-link}.svg') no-repeat 0 0; | ||
background-size: 100%; | ||
content: ''; | ||
display: inline-block; | ||
height: 0.65em; | ||
margin-bottom: -1px; | ||
margin-left: units(0.5); | ||
width: 0.65em; | ||
} | ||
|
||
&:hover::after { | ||
@include add-background-svg('#{$external-link-hover}'); | ||
} | ||
} |
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,4 @@ | ||
@mixin media-block-img($margin-right: units(1)) { | ||
float: left; | ||
margin-right: $margin-right; | ||
} |
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,5 @@ | ||
// TODO: Add documentation instructions for using this class on image links | ||
@mixin media-link { | ||
display: inline-block; | ||
line-height: 0; | ||
} |
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,10 @@ | ||
@mixin usa-list-styles { | ||
ul, | ||
ol { | ||
@extend %usa-list; | ||
} | ||
|
||
li { | ||
@extend %usa-list-item; | ||
} | ||
} |
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,5 @@ | ||
@mixin usa-table-styles { | ||
table { | ||
@extend %usa-table; | ||
} | ||
} |
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,58 @@ | ||
@mixin usa-typography-base-styles { | ||
p { | ||
@include typeset-p; | ||
} | ||
|
||
a { | ||
@include typeset-link; | ||
} | ||
} | ||
|
||
@mixin usa-headings-styles { | ||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6 { | ||
@extend %usa-heading; | ||
} | ||
|
||
h1 { | ||
@include h1; | ||
} | ||
|
||
h2 { | ||
@include h2; | ||
} | ||
|
||
h3 { | ||
@include h3; | ||
} | ||
|
||
h4 { | ||
@include h4; | ||
} | ||
|
||
h5 { | ||
@include h5; | ||
} | ||
|
||
h6 { | ||
@include h6; | ||
} | ||
} | ||
|
||
// Basic typography styles (paragraph text and links) | ||
@mixin theme-global-styles-basic { | ||
@if $theme-global-styles-basic == true { | ||
@include usa-typography-base-styles; | ||
} | ||
} | ||
|
||
@mixin usa-content-styles { | ||
@include usa-typography-base-styles; | ||
@include usa-headings-styles; | ||
@include usa-list-styles; | ||
@include usa-table-styles; | ||
} |
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
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
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 |
---|---|---|
|
@@ -35,12 +35,6 @@ | |
} | ||
} | ||
|
||
@mixin usa-table-styles { | ||
table { | ||
@extend %usa-table; | ||
} | ||
} | ||
|
||
.usa-table { | ||
@extend %usa-table; | ||
} | ||
|
Oops, something went wrong.