Skip to content

Commit

Permalink
Cleaned up SCSS files so they lint and made some rules warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
belcherj committed Aug 10, 2016
1 parent efd390e commit 90c0db8
Show file tree
Hide file tree
Showing 15 changed files with 719 additions and 716 deletions.
1 change: 1 addition & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
assets/css/select2.scss
9 changes: 5 additions & 4 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"rules": {
"indentation": "tab",
"color-hex-case": "lower",
"color-no-invalid-hex": true,

Expand All @@ -19,7 +20,7 @@

"unit-case": "lower",
"unit-no-unknown": true,
"unit-whitelist": ["px", "%", "deg", "ms", "em", "vh", "vw", "rem"],
"unit-whitelist": ["px", "%", "deg", "ms", "em", "vh", "vw", "rem", "s", "ex", "pt", "cm"],

"value-list-comma-space-after": "always-single-line",
"value-list-comma-space-before": "never",
Expand All @@ -28,8 +29,8 @@

"property-case": "lower",

"declaration-block-no-duplicate-properties": true,
"declaration-block-no-ignored-properties": true,
"declaration-block-no-duplicate-properties": [true, { "severity": "warning" } ],
"declaration-block-no-ignored-properties": [true, { "severity": "warning" } ],
"declaration-block-trailing-semicolon": "always",
"declaration-block-single-line-max-declarations": 0,
"declaration-block-semicolon-space-before": "never",
Expand All @@ -54,6 +55,6 @@
"selector-pseudo-element-colon-notation": "double",
"selector-pseudo-element-no-unknown": true,
"selector-type-case": "lower",
"selector-no-id": true
"selector-no-id": [true, { "severity": "warning" } ],
}
}
2 changes: 1 addition & 1 deletion assets/css/_animation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
*/
@include keyframes( spin ) {
100% {
@include transform( rotate(360deg) );
@include transform( rotate( 360deg ) );
}
}
44 changes: 22 additions & 22 deletions assets/css/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
@mixin clearfix() {
*zoom: 1;

&:before,
&:after {
content: " ";
&::before,
&::after {
content: ' ';
display: table;
}

&:after {
&::after {
clear: both;
}
}
Expand Down Expand Up @@ -105,7 +105,7 @@
* Deprecated
* Vendor prefix no longer required.
*/
@mixin transition($selector: all, $animation: ease-in-out, $duration: .2s) {
@mixin transition($selector: all, $animation: ease-in-out, $duration: 0.2s) {
transition: $selector $animation $duration;
}

Expand All @@ -126,10 +126,11 @@
box-sizing: border-box;
}

@mixin darkorlighttextshadow($a, $opacity: .8) {
@mixin darkorlighttextshadow($a, $opacity: 0.8) {
@if lightness($a) >= 65% {
@include text_shadow(0, -1px, 0, rgba(0, 0, 0, $opacity));
} @else {
}
@else {
@include text_shadow(0, 1px, 0, rgba(255, 255, 255, $opacity));
}
}
Expand Down Expand Up @@ -171,7 +172,7 @@
width: 1em;
}

@mixin icon( $glyph: "\e001" ) {
@mixin icon( $glyph: '\e001' ) {
font-family: 'WooCommerce';
speak: none;
font-weight: normal;
Expand All @@ -190,7 +191,7 @@
content: $glyph;
}

@mixin icon_dashicons( $glyph: "\f333" ) {
@mixin icon_dashicons( $glyph: '\f333' ) {
font-family: 'Dashicons';
speak: none;
font-weight: normal;
Expand All @@ -209,63 +210,62 @@
content: $glyph;
}

@mixin iconbefore( $glyph: "\e001" ) {
@mixin iconbefore( $glyph: '\e001' ) {
font-family: 'WooCommerce';
speak: none;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
margin-right: .618em;
margin-right: 0.618em;
content: $glyph;
text-decoration: none;
}

@mixin iconbeforedashicons( $glyph: "\f333" ) {
@mixin iconbeforedashicons( $glyph: '\f333' ) {
font-family: 'Dashicons';
speak: none;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
margin-right: .618em;
margin-right: 0.618em;
content: $glyph;
text-decoration: none;
}

@mixin iconafter( $glyph: "\e001" ) {
@mixin iconafter( $glyph: '\e001' ) {
font-family: 'WooCommerce';
speak: none;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
margin-left: .618em;
margin-left: 0.618em;
content: $glyph;
text-decoration: none;
}

@mixin loader() {
&:before {
&::before {
height: 1em;
width: 1em;
display: block;
position: absolute;
top: 50%;
left: 50%;
margin-left: -.5em;
margin-top: -.5em;
display: block;
content: "";
margin-left: -0.5em;
margin-top: -0.5em;
content: '';
@include animation( spin 1s ease-in-out infinite );
background: url(../images/icons/loader.svg) center center;
background: url('../images/icons/loader.svg') center center;
background-size: cover;
line-height: 1;
text-align: center;
font-size: 2em;
color: rgba(#000,0.75);
color: rgba(#000, 0.75);
}
}
36 changes: 18 additions & 18 deletions assets/css/activation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* Imports
*/
@import "bourbon";
@import 'bourbon';

/**
* Styling begins
Expand All @@ -24,17 +24,17 @@ p.woocommerce-actions,
.woocommerce-message {
a.button-primary {
background: #bb77ae;
border-color: #A36597;
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 0 #A36597;
box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 0 #A36597;
border-color: #a36597;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #a36597;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #a36597;
color: #fff;
text-shadow: 0px -1px 1px #A36597, 1px 0px 1px #A36597, 0px 1px 1px #A36597, -1px 0px 1px #A36597;
text-shadow: 0 -1px 1px #a36597, 1px 0 1px #a36597, 0 1px 1px #a36597, -1px 0 1px #a36597;

&:hover, &:focus, &:active {
background: #A36597;
border-color: #A36597;
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 0 #A36597;
box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 0 #A36597;
background: #a36597;
border-color: #a36597;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #a36597;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #a36597;
}
}

Expand All @@ -46,12 +46,12 @@ p.woocommerce-actions,
font-size: 13px;
line-height: 1.23076923;
text-decoration: none;
&:before {
&::before {
position: absolute;
top: 8px;
left: 0;
-webkit-transition: all .1s ease-in-out;
transition: all .1s ease-in-out;
top: 8px;
left: 0;
-webkit-transition: all 0.1s ease-in-out;
transition: all 0.1s ease-in-out;
}
}

Expand Down Expand Up @@ -87,12 +87,12 @@ div.woocommerce-no-shipping-methods-notice {
font-size: 1.1em;
}
}
&:before {
content: "\e01b";
font-family: "WooCommerce";
&::before {
content: '\e01b';
font-family: 'WooCommerce';
text-align: center;
line-height: 1;
color: #F7F1F6;
color: #f7f1f6;
display: block;
width: 1em;
font-size: 20em;
Expand Down
Loading

0 comments on commit 90c0db8

Please sign in to comment.