Skip to content

Commit

Permalink
Improve SASS coding with Hound CI results, and change Hound CI configs.
Browse files Browse the repository at this point in the history
  • Loading branch information
picturepan2 committed Sep 1, 2017
1 parent 30cf502 commit 01ab183
Show file tree
Hide file tree
Showing 36 changed files with 96 additions and 49 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/dist/
node_modules/
.*
!.csscomb.json
!.gitignore
!.gitattributes
!.csscomb.json
!.hound.yml
2 changes: 2 additions & 0 deletions .hound.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
scss:
config_file: .scss-lint.yml
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### [v0.4.0](https://github.com/picturepan2/spectre/releases/tag/v0.4.0)

- Switch from LESS to SASS
- Add Cursor utilities

### [v0.3.2](https://github.com/picturepan2/spectre/releases/tag/v0.3.2)

Expand Down
3 changes: 3 additions & 0 deletions docs/components.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ <h2>Spectre.css</h2>
<li class="menu-item">
<a href="utilities.html#colors">Colors</a>
</li>
<li class="menu-item">
<a href="utilities.html#cursors">Cursors</a>
</li>
<li class="menu-item">
<a href="utilities.html#display">Display</a>
</li>
Expand Down
28 changes: 14 additions & 14 deletions docs/dist/spectre.css
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,8 @@ abbr[title] {
kbd {
background: #454d5d;
border-radius: .1rem;
color: #fff;
font-size: .65rem;
color: #fff;
font-size: .65rem;
line-height: 1;
padding: .15rem;
}
Expand Down Expand Up @@ -767,7 +767,7 @@ legend {
}

.form-input:focus {
border-color: #5764c6;
border-color: #5764c6;
box-shadow: 0 0 0 .1rem rgba(87, 100, 198, .2);
}

Expand Down Expand Up @@ -857,7 +857,7 @@ textarea.form-input {
}

.form-select:focus {
border-color: #5764c6;
border-color: #5764c6;
box-shadow: 0 0 0 .1rem rgba(87, 100, 198, .2);
}

Expand Down Expand Up @@ -931,7 +931,7 @@ textarea.form-input {
.form-checkbox input:focus + .form-icon,
.form-radio input:focus + .form-icon,
.form-switch input:focus + .form-icon {
border-color: #5764c6;
border-color: #5764c6;
box-shadow: 0 0 0 .1rem rgba(87, 100, 198, .2);
}

Expand Down Expand Up @@ -1182,7 +1182,7 @@ textarea.form-input {
.form-radio.is-error input:focus + .form-icon,
.has-error .form-switch input:focus + .form-icon,
.form-switch.is-error input:focus + .form-icon {
border-color: #e85600;
border-color: #e85600;
box-shadow: 0 0 0 .1rem rgba(232, 86, 0, .2);
}

Expand Down Expand Up @@ -1241,8 +1241,8 @@ input.disabled + .form-icon {
.label {
background: #f8f9fa;
border-radius: .1rem;
color: #5b657a;
display: inline-block;
color: #5b657a;
display: inline-block;
line-height: 1;
padding: .15rem;
}
Expand Down Expand Up @@ -1281,8 +1281,8 @@ input.disabled + .form-icon {
code {
background: #fdf4f4;
border-radius: .1rem;
color: #e06870;
font-size: .65rem;
color: #e06870;
font-size: .65rem;
line-height: 1;
padding: .15rem;
}
Expand Down Expand Up @@ -1911,7 +1911,7 @@ code {
}

.form-autocomplete .form-autocomplete-input.is-focused {
border-color: #5764c6;
border-color: #5764c6;
box-shadow: 0 0 0 .1rem rgba(87, 100, 198, .2);
}

Expand Down Expand Up @@ -2623,7 +2623,7 @@ code {
}

.popover .card {
border: 0;
border: 0;
box-shadow: 0 .2rem .5rem rgba(69, 77, 93, .3);
}

Expand Down Expand Up @@ -2798,7 +2798,7 @@ code {

.tile.tile-centered .tile-title,
.tile.tile-centered .tile-subtitle {
margin-bottom: 0;
margin-bottom: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
Expand Down Expand Up @@ -3195,7 +3195,7 @@ a.text-error:hover {
.loading.loading-lg::after {
height: 1.6rem;
margin-left: -.8rem;
margin-top: -.8rem;
margin-top: -.8rem;
width: 1.6rem;
}

Expand Down
3 changes: 3 additions & 0 deletions docs/elements.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ <h2>Spectre.css</h2>
<li class="menu-item">
<a href="utilities.html#colors">Colors</a>
</li>
<li class="menu-item">
<a href="utilities.html#cursors">Cursors</a>
</li>
<li class="menu-item">
<a href="utilities.html#display">Display</a>
</li>
Expand Down
3 changes: 3 additions & 0 deletions docs/experimentals.html
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ <h2>Spectre.css</h2>
<li class="menu-item">
<a href="utilities.html#colors">Colors</a>
</li>
<li class="menu-item">
<a href="utilities.html#cursors">Cursors</a>
</li>
<li class="menu-item">
<a href="utilities.html#display">Display</a>
</li>
Expand Down
3 changes: 3 additions & 0 deletions docs/getting-started.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ <h2>Spectre.css</h2>
<li class="menu-item">
<a href="utilities.html#colors">Colors</a>
</li>
<li class="menu-item">
<a href="utilities.html#cursors">Cursors</a>
</li>
<li class="menu-item">
<a href="utilities.html#display">Display</a>
</li>
Expand Down
3 changes: 3 additions & 0 deletions docs/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ <h2>Spectre.css</h2>
<li class="menu-item">
<a href="utilities.html#colors">Colors</a>
</li>
<li class="menu-item">
<a href="utilities.html#cursors">Cursors</a>
</li>
<li class="menu-item">
<a href="utilities.html#display">Display</a>
</li>
Expand Down
4 changes: 2 additions & 2 deletions docs/utilities.html
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,9 @@ <h4 id="colors-background" class="s-subtitle">Background colors</h4>
</div>

<div id="cursors" class="container">
<h3 class="s-title"><a href="#cursors" class="anchor" aria-hidden="true">#</a>Cursors utilities</h3>
<h3 class="s-title"><a href="#cursors" class="anchor" aria-hidden="true">#</a>Cursor utilities</h3>
<div class="docs-note">
<p>Cursors utilities specify which mouse cursor to display when mouseover.</p>
<p>Cursor utilities specify which mouse cursor to display when mouseover.</p>
</div>
<div class="columns">
<div class="column">
Expand Down
2 changes: 1 addition & 1 deletion src/_autocomplete.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
padding: $unit-h;

&.is-focused {
border-color: $primary-color;
@include control-shadow();
border-color: $primary-color;
}

.form-input {
Expand Down
2 changes: 1 addition & 1 deletion src/_buttons.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Buttons
.btn {
@include control-transition();
appearance: none;
background: $bg-color-light;
border: $border-width solid $primary-color;
border-radius: $border-radius;
color: $primary-color;
@include control-transition();
cursor: pointer;
display: inline-block;
font-size: $font-size;
Expand Down
2 changes: 1 addition & 1 deletion src/_calendars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
padding: $unit-1;

.date-item {
@include control-transition();
appearance: none;
background: transparent;
border: $border-width solid transparent;
border-radius: 50%;
color: $gray-color-dark;
@include control-transition();
cursor: pointer;
height: $unit-7;
line-height: $unit-5;
Expand Down
2 changes: 1 addition & 1 deletion src/_cards.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/_codes.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Codes
code {
font-size: .65rem;
@include label-base();
@include label-variant($code-color, lighten($code-color, 33%));
font-size: .65rem;
}

.code {
Expand Down
14 changes: 7 additions & 7 deletions src/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ legend {

// Form element: Input
.form-input {
@include control-transition();
appearance: none;
background: $bg-color-light;
background-image: none;
border: $border-width solid $border-color-dark;
border-radius: $border-radius;
color: $body-font-color;
@include control-transition();
display: block;
font-size: $font-size;
height: $control-size;
Expand All @@ -48,8 +48,8 @@ legend {
position: relative;
width: 100%;
&:focus {
border-color: $primary-color;
@include control-shadow();
border-color: $primary-color;
}
&::placeholder {
color: $gray-color;
Expand Down Expand Up @@ -129,8 +129,8 @@ textarea.form-input {
padding-right: $control-icon-size + $control-padding-h;
}
&:focus {
border-color: $primary-color;
@include control-shadow();
border-color: $primary-color;
}
&::-ms-expand {
display: none;
Expand Down Expand Up @@ -202,8 +202,8 @@ textarea.form-input {
position: absolute;
width: 1px;
&:focus + .form-icon {
border-color: $primary-color;
@include control-shadow();
border-color: $primary-color;
}
&:checked + .form-icon {
background: $primary-color;
Expand All @@ -212,8 +212,8 @@ textarea.form-input {
}

.form-icon {
border: $border-width solid $border-color-dark;
@include control-transition();
border: $border-width solid $border-color-dark;
cursor: pointer;
display: inline-block;
position: absolute;
Expand Down Expand Up @@ -312,6 +312,7 @@ textarea.form-input {
top: ($control-size-sm - $unit-4) / 2 - $border-width;
width: $unit-8;
&::before {
@include control-transition();
background: $bg-color-light;
border-radius: $unit-2;
content: "";
Expand All @@ -320,7 +321,6 @@ textarea.form-input {
left: 0;
position: absolute;
top: 0;
@include control-transition();
width: $unit-4;
}
}
Expand Down Expand Up @@ -436,8 +436,8 @@ textarea.form-input {
}

&:focus + .form-icon {
border-color: $error-color;
@include control-shadow($error-color);
border-color: $error-color;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/_labels.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Labels
.label {
display: inline-block;
@include label-base();
@include label-variant(lighten($body-font-color, 5%), $bg-color);
display: inline-block;

&.label-rounded {
border-radius: 5rem;
Expand Down
2 changes: 1 addition & 1 deletion src/_media.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@
color: $gray-color-dark;
margin-top: $layout-spacing;
}
}
}
2 changes: 1 addition & 1 deletion src/_menus.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Menus
.menu {
@include shadow-variant(.05rem);
background: $bg-color-light;
border-radius: $border-radius;
list-style: none;
margin: 0;
min-width: $control-min-width;
padding: $unit-2;
@include shadow-variant(.05rem);
transform: translateY($layout-spacing-sm);
z-index: $zindex-1;

Expand Down
2 changes: 1 addition & 1 deletion src/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,4 @@
@mixin toast-variant($color: $dark-color) {
background: rgba($color, .9);
border-color: $color;
}
}
2 changes: 1 addition & 1 deletion src/_modals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
}

.modal-container {
@include shadow-variant(.2rem);
background: $bg-color-light;
border-radius: $border-radius;
display: block;
padding: 0;
@include shadow-variant(.2rem);
text-align: left;

.modal-header {
Expand Down
2 changes: 1 addition & 1 deletion src/_parallax.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ $parallax-scale: .95;
width: auto;

.parallax-content {
height: auto;
@include shadow-variant(1rem);
height: auto;
transform: perspective($parallax-perspective);
transform-style: preserve-3d;
transition: all .4s ease;
Expand Down
2 changes: 1 addition & 1 deletion src/_popovers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
}

.card {
border: 0;
@include shadow-variant(.2rem);
border: 0;
}
}
Loading

0 comments on commit 01ab183

Please sign in to comment.