Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Commit

Permalink
Merge pull request salesforce-ux#162 from salesforce-ux/feature/lint-…
Browse files Browse the repository at this point in the history
…LeadingZero

Throw warnings when a zero does not precede a decimal number between 0 and 1
  • Loading branch information
jina committed Dec 1, 2015
2 parents 37c81d7 + 5bb951b commit 3619b52
Show file tree
Hide file tree
Showing 19 changed files with 53 additions and 52 deletions.
3 changes: 2 additions & 1 deletion .scss-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ linters:
Indentation:
enabled: false
LeadingZero:
enabled: false
enabled: true
style: include_zero
MergeableSelector:
enabled: false
NameFormat:
Expand Down
14 changes: 7 additions & 7 deletions site/assets/styles/_iframe.common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ body {
line-height: 2rem;
background-color: $color-brand;
color: $color-text-inverse;
box-shadow: rgba(black,.1) 0 0 0 1px inset;
box-shadow: rgba(black, 0.1) 0 0 0 1px inset;
}

.#{$css-prefix}grid--overflow
Expand Down Expand Up @@ -109,8 +109,8 @@ body {
// For the .button--hint demo - parent needs to have some space
.hint-parent-demo {
padding: 20px;
background-color: rgba($color-brand,.35);
border: 1px solid rgba($color-brand,.1);
background-color: rgba($color-brand, 0.35);
border: 1px solid rgba($color-brand, 0.1);
}

// To space separate rows of demo items apart
Expand Down Expand Up @@ -160,15 +160,15 @@ body {
.demo-only--margin-theme > div:before {
content: '';
position: absolute;
background: rgba(black,.1);
background: rgba(black, 0.1);
width: 100%;
height: 1px;
left: 0;
top: 0;
}

.demo-only--padding-theme > div {
border-bottom: 1px solid rgba(black,.1);
border-bottom: 1px solid rgba(black, 0.1);
}

.demo-only--padding-theme > div:before {
Expand Down Expand Up @@ -198,12 +198,12 @@ body {
}
.hidden {
color: $color-text-weak;
opacity: .5;
opacity: 0.5;
}
}

.demo-visibility [class*="-hide"] {
opacity: .5;
opacity: 0.5;
}

.demo-class-pill {
Expand Down
4 changes: 2 additions & 2 deletions site/assets/styles/_site/dependencies/typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@


// Font Size
$site-font-size-small: .75rem;
$site-font-size-medium: .875rem;
$site-font-size-small: 0.75rem;
$site-font-size-medium: 0.875rem;
$site-font-size-large: 1.125rem;
$site-font-size-x-large: 1.25rem;
$site-font-size-xx-large: 1.5rem;
Expand Down
4 changes: 2 additions & 2 deletions site/assets/styles/_site/page-types/examples.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
text-align: center;

&--disabled img {
filter: grayscale(.9);
filter: grayscale(0.9);
}
}

Expand All @@ -35,6 +35,6 @@
}
.hidden {
color: $color-text-weak;
opacity: .5;
opacity: 0.5;
}
}
12 changes: 6 additions & 6 deletions site/assets/styles/_site/page-types/motion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
}

.atmosphere-hline {
left: .5rem;
left: 0.5rem;
width: 2.5rem;
}
}

.atmosphere-hline {
position: absolute;
left: 5.5rem;
width: .5rem;
width: 0.5rem;
border-top: $border-width-thin solid $color-border-separator-alt;
transform: translateX(-1rem);
}
Expand Down Expand Up @@ -212,7 +212,7 @@

&--on {
opacity: 0;
transform: translate3d(-50%, -50%, 0) scale(.8);
transform: translate3d(-50%, -50%, 0) scale(0.8);
box-shadow: $elevation-shadow-0;
}
}
Expand Down Expand Up @@ -244,7 +244,7 @@
box-shadow: $elevation-shadow-8;

&--on {
transform: translate3d(-50%, -50%, 0) scale(.9);
transform: translate3d(-50%, -50%, 0) scale(0.9);
box-shadow: $elevation-shadow-4;
}
}
Expand All @@ -271,7 +271,7 @@
box-shadow: $elevation-shadow-3-below;

span {
transform: translate3d(-50%, -50%, 0) scale(.95);
transform: translate3d(-50%, -50%, 0) scale(0.95);
}
}
}
Expand Down Expand Up @@ -303,7 +303,7 @@
transition: $duration-promptly transform ease-in-out;

&--on {
transform: translate3d(-50%, -50%, 0) scale(.9);
transform: translate3d(-50%, -50%, 0) scale(0.9);
}
}

Expand Down
12 changes: 6 additions & 6 deletions site/assets/styles/_site/page-types/tokens.scss
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@
left: 50%;
content: "";
border: {
right: .5rem solid transparent;
bottom: .5rem solid $color-text-inverse;
left: .5rem solid transparent;
right: 0.5rem solid transparent;
bottom: 0.5rem solid $color-text-inverse;
left: 0.5rem solid transparent;
}
transform: translate(-50%, -300%);
}
Expand All @@ -128,9 +128,9 @@
left: 50%;
content: "";
border: {
top: .5rem solid $color-text-inverse;
right: .5rem solid transparent;
left: .5rem solid transparent;
top: 0.5rem solid $color-text-inverse;
right: 0.5rem solid transparent;
left: 0.5rem solid transparent;
}
transform: translate(-50%, 200%);
}
Expand Down
6 changes: 3 additions & 3 deletions site/assets/styles/_site/regions/banner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
&:hover,
&:focus {
text-decoration: none;
background-color: rgba($color-background, .5);
background-color: rgba($color-background, 0.5);
}

&:active {
background-color: rgba($color-background, .75);
background-color: rgba($color-background, 0.75);
}
}

Expand Down Expand Up @@ -62,7 +62,7 @@
}

.site-banner-badge {
@include gradient-striped(rgba(white,.2), -45deg, #FBBC05);
@include gradient-striped(rgba(white, 0.2), -45deg, #FBBC05);
background-size: 12px 12px;
color: #16325C;
font-weight: $font-weight-bold;
Expand Down
4 changes: 2 additions & 2 deletions site/assets/styles/_site/regions/contentinfo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@

.site-contentinfo {
padding: $spacing-medium;
background: rgba($color-background-alt-2, .3);
background: rgba($color-background-alt-2, 0.3);

a {
color: $color-text-default;

&:hover,
&:focus {
background-color: rgba($color-background-alt-2, .5);
background-color: rgba($color-background-alt-2, 0.5);
}

&:active {
Expand Down
4 changes: 2 additions & 2 deletions site/assets/styles/_site/regions/navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
color: $color-text-default;

&:hover {
background-color: rgba($color-background, .5);
background-color: rgba($color-background, 0.5);
}
}

Expand Down Expand Up @@ -68,7 +68,7 @@
.icon__svg {
@include square($square-icon-x-small-content);
display: inline-block;
opacity: .5;
opacity: 0.5;
}

.#{$css-prefix}is-selected > a .icon__svg {
Expand Down
2 changes: 1 addition & 1 deletion site/assets/styles/_site/utilities/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

.site-theme--checker {
$checker-size: $spacing-small;
$checker-color: rgba($color-background, .5);
$checker-color: rgba($color-background, 0.5);
background: {
color: $color-background-alt;
image:
Expand Down
2 changes: 1 addition & 1 deletion site/assets/styles/_ui-preview/kanban.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
color: $color-text-inverse;
font-size: $font-size-small;
text-align: center;
letter-spacing: .9px;
letter-spacing: 0.9px;

&:before {
content: "";
Expand Down
2 changes: 1 addition & 1 deletion ui/components/badges/flavors/base/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
font-size: $font-size-x-small;
line-height: $line-height-heading;
text-transform: uppercase;
letter-spacing: .0625em;
letter-spacing: 0.0625em;
color: $color-text-default;
vertical-align: middle;
white-space: nowrap;
Expand Down
2 changes: 1 addition & 1 deletion ui/components/button-groups/flavors/base/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
}

&:only-child {
border-radius: .25rem;
border-radius: 0.25rem;
}
}

Expand Down
2 changes: 1 addition & 1 deletion ui/components/forms/flavors/radio/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
background: $color-background-input;

&:after {
@include square(.5rem);
@include square(0.5rem);
content: '';
position: absolute;
top: 50%;
Expand Down
2 changes: 1 addition & 1 deletion ui/components/menus/flavors/dropdown/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@

&:after {
background: $color-background-alt;
box-shadow: -1px -1px 0 0 rgba(0, 0, 0, .16);
box-shadow: -1px -1px 0 0 rgba(0, 0, 0, 0.16);
z-index: -1;
}

Expand Down
2 changes: 1 addition & 1 deletion ui/dependencies/core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
a {
color: $color-text-link;
text-decoration: none;
transition: color .1s linear;
transition: color 0.1s linear;

&:hover,
&:focus {
Expand Down
24 changes: 12 additions & 12 deletions ui/dependencies/popover.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
@include nubbin(top, $color: $color);

&:after {
box-shadow: -1px -1px 0 0 rgba(0, 0, 0, .16);
box-shadow: -1px -1px 0 0 rgba(0, 0, 0, 0.16);
z-index: -1;
}
}
Expand All @@ -64,7 +64,7 @@
@include nubbin(top, $color: $color);

&:after {
box-shadow: -1px -1px 0 0 rgba(0, 0, 0, .16);
box-shadow: -1px -1px 0 0 rgba(0, 0, 0, 0.16);
z-index: -1;
}
}
Expand All @@ -83,7 +83,7 @@
@include nubbin(top, $color: $color);

&:after {
box-shadow: -1px -1px 0 0 rgba(0, 0, 0, .16);
box-shadow: -1px -1px 0 0 rgba(0, 0, 0, 0.16);
z-index: -1;
}
}
Expand All @@ -104,7 +104,7 @@
@include nubbin(bottom, $color: $color);

&:after {
box-shadow: 2px 2px 4px 0 rgba(0, 0, 0, .16);
box-shadow: 2px 2px 4px 0 rgba(0, 0, 0, 0.16);
z-index: -1;
}
}
Expand All @@ -117,7 +117,7 @@
@include nubbin(bottom, $color: $color);

&:after {
box-shadow: 2px 2px 4px 0 rgba(0, 0, 0, .16);
box-shadow: 2px 2px 4px 0 rgba(0, 0, 0, 0.16);
z-index: -1;
}
}
Expand All @@ -137,7 +137,7 @@
@include nubbin(bottom, $color: $color);

&:after {
box-shadow: 2px 2px 4px 0 rgba(0, 0, 0, .16);
box-shadow: 2px 2px 4px 0 rgba(0, 0, 0, 0.16);
z-index: -1;
}
}
Expand All @@ -159,7 +159,7 @@
@include nubbin(left, $color: $color);

&:after {
box-shadow: -1px 1px 2px 0 rgba(0, 0, 0, .16);
box-shadow: -1px 1px 2px 0 rgba(0, 0, 0, 0.16);
z-index: -1;
}
}
Expand All @@ -172,7 +172,7 @@
@include nubbin(left, $color: $color);

&:after {
box-shadow: -1px 1px 2px 0 rgba(0, 0, 0, .16);
box-shadow: -1px 1px 2px 0 rgba(0, 0, 0, 0.16);
z-index: -1;
}
}
Expand All @@ -194,7 +194,7 @@
}

&:after {
box-shadow: -1px 2px 3px 0 rgba(0, 0, 0, .16);
box-shadow: -1px 2px 3px 0 rgba(0, 0, 0, 0.16);
z-index: -1;
}
}
Expand All @@ -213,7 +213,7 @@
@include nubbin(right, $color: $color);

&:after {
box-shadow: 1px -1px 2px 0 rgba(0, 0, 0, .16);
box-shadow: 1px -1px 2px 0 rgba(0, 0, 0, 0.16);
z-index: -1;
}
}
Expand All @@ -226,7 +226,7 @@
@include nubbin(right, $color: $color);

&:after {
box-shadow: 1px -1px 2px 0 rgba(0, 0, 0, .16);
box-shadow: 1px -1px 2px 0 rgba(0, 0, 0, 0.16);
z-index: -1;
}
}
Expand All @@ -248,7 +248,7 @@
}

&:after {
box-shadow: 2px -1px 3px 0 rgba(0, 0, 0, .16);
box-shadow: 2px -1px 3px 0 rgba(0, 0, 0, 0.16);
z-index: -1;
}
}
Expand Down
Loading

0 comments on commit 3619b52

Please sign in to comment.