Skip to content

Commit

Permalink
Validate CSS, add some excludes
Browse files Browse the repository at this point in the history
  • Loading branch information
Roni Laukkarinen committed Nov 14, 2018
1 parent b69150a commit fa21d12
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 49 deletions.
4 changes: 2 additions & 2 deletions .scss-lint.yml
Expand Up @@ -34,7 +34,7 @@ linters:
enabled: false

Comment:
enabled: true
enabled: false
style: silent

DebugStatement:
Expand Down Expand Up @@ -166,7 +166,7 @@ linters:
SelectorFormat:
enabled: true
convention: hyphenated_lowercase # or 'classic_BEM', or 'hyphenated_BEM', or 'snake_case', or 'camel_case', or a regex pattern
ignored_names: ['breadcrumbs__crumb--home', 'breadcrumbs__crumb', 'breadcrumbs__trail', 'breadcrumbs__title', 'gform_body', 'ginput_container_checkbox', 'choice_1_8_1', 'gform_page_footer', 'gform_wrapper', 'gform_header', 'field_1_1', 'field_1_2', 'field_1_3', 'field_1_4', 'field_1_5', 'field_1_6', 'field_1_7', 'field_1_8', 'field_1_9', 'field_1_10', 'field_2_1', 'field_2_2', 'field_2_3', 'field_2_4', 'field_2_5', 'field_2_6', 'field_2_7', 'field_2_8', 'field_2_9', 'field_2_10', 'ginput_container_email', 'gform_footer', 'top_label', 'gfield_radio', 'gfield_checkbox']
ignored_names: ['current_menu_item', 'current_page_parent', 'breadcrumbs__crumb--home', 'breadcrumbs__crumb', 'breadcrumbs__trail', 'breadcrumbs__title', 'gform_body', 'ginput_container_checkbox', 'choice_1_8_1', 'gform_page_footer', 'gform_wrapper', 'gform_header', 'field_1_1', 'field_1_2', 'field_1_3', 'field_1_4', 'field_1_5', 'field_1_6', 'field_1_7', 'field_1_8', 'field_1_9', 'field_1_10', 'field_2_1', 'field_2_2', 'field_2_3', 'field_2_4', 'field_2_5', 'field_2_6', 'field_2_7', 'field_2_8', 'field_2_9', 'field_2_10', 'ginput_container_email', 'gform_footer', 'top_label', 'gfield_radio', 'gfield_checkbox']

Shorthand:
enabled: true
Expand Down
27 changes: 5 additions & 22 deletions css/global.css
Expand Up @@ -4,13 +4,10 @@
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
html {
line-height: 1.15;
/* 1 */
-webkit-text-size-adjust: 100%;
/* 2 */
}

/* Sections
Expand Down Expand Up @@ -38,7 +35,7 @@ h1 {
* 2. Show the overflow in Edge and IE.
*/
hr {
-webkit-box-sizing: content-box;
/* autoprefixer: ignore next */
box-sizing: content-box;
/* 1 */
height: 0;
Expand Down Expand Up @@ -224,7 +221,7 @@ fieldset {
* `fieldset` elements in all browsers.
*/
legend {
-webkit-box-sizing: border-box;
/* autoprefixer: ignore next */
box-sizing: border-box;
/* 1 */
color: inherit;
Expand Down Expand Up @@ -259,7 +256,7 @@ textarea {
*/
[type="checkbox"],
[type="radio"] {
-webkit-box-sizing: border-box;
/* autoprefixer: ignore next */
box-sizing: border-box;
/* 1 */
padding: 0;
Expand Down Expand Up @@ -339,12 +336,12 @@ html,
*,
*:before,
*:after {
-webkit-box-sizing: border-box;
/* autoprefixer: ignore next */
box-sizing: border-box;
}

img {
-webkit-box-sizing: content-box;
/* autoprefixer: ignore next */
box-sizing: content-box;
}

Expand Down Expand Up @@ -576,7 +573,6 @@ body {
font-size: 1.7rem;
font-family: 'Karla', 'Helvetica Neue', Helvetica, sans-serif;
color: #222;
font-smoothing: antialiased;
-webkit-text-size-adjust: none;
-moz-text-size-adjust: none;
-ms-text-size-adjust: none;
Expand Down Expand Up @@ -1685,19 +1681,14 @@ form.search-form .search-submit {
-webkit-transition: none;
-o-transition: none;
transition: none;
-webkit-transition-delay: none;
-o-transition-delay: none;
transition-delay: none;
-webkit-transform: none;
-ms-transform: none;
transform: none;
}

[data-whatinput="mouse"] .nav-primary ul .menu-item-has-children:focus > .sub-menu,
[data-whatinput="mouse"] .nav-primary ul .menu-item-has-children:focus-within > .sub-menu,
[data-whatinput="mouse"] .nav-primary ul .menu-item-has-children:hover > .sub-menu,
[data-whatintent="mouse"] .nav-primary ul .menu-item-has-children:focus > .sub-menu,
[data-whatintent="mouse"] .nav-primary ul .menu-item-has-children:focus-within > .sub-menu,
[data-whatintent="mouse"] .nav-primary ul .menu-item-has-children:hover > .sub-menu {
visibility: visible;
opacity: 1;
Expand All @@ -1724,13 +1715,9 @@ form.search-form .search-submit {
-webkit-transition: none;
-o-transition: none;
transition: none;
-webkit-transition-delay: none;
-o-transition-delay: none;
transition-delay: none;
}

.no-js .nav-primary ul .menu-item-has-children:focus > .sub-menu,
.no-js .nav-primary ul .menu-item-has-children:focus-within > .sub-menu,
.no-js .nav-primary ul .menu-item-has-children:hover > .sub-menu {
visibility: visible;
opacity: 1;
Expand All @@ -1757,9 +1744,6 @@ form.search-form .search-submit {
-webkit-transition: none;
-o-transition: none;
transition: none;
-webkit-transition-delay: none;
-o-transition-delay: none;
transition-delay: none;
list-style-type: none;
list-style: none;
}
Expand All @@ -1779,7 +1763,6 @@ form.search-form .search-submit {
}

.nav-primary ul .menu-item-has-children:focus > .sub-menu,
.nav-primary ul .menu-item-has-children:focus-within > .sub-menu,
.nav-primary ul .menu-item-has-children:hover > .sub-menu {
visibility: visible;
opacity: 1;
Expand Down
2 changes: 1 addition & 1 deletion css/global.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion functions.php
Expand Up @@ -5,7 +5,7 @@
* @package air-light
*/

define( 'AIR_LIGHT_VERSION', '4.4.3' );
define( 'AIR_LIGHT_VERSION', '4.4.4' );

/**
* Requires.
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "air-light",
"version": "4.4.3",
"version": "4.4.4",
"description": "A minimalist WordPress starter theme.",
"author": "Digitoimisto Dude Oy (moro@dude.fi)",
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Expand Up @@ -12,7 +12,7 @@ Tags: one-column, accessibility-ready, translation-ready

Requires at least: 4.0
Tested up to: 4.9.6
Stable tag: 4.4.3
Stable tag: 4.4.4
License: MIT License
License URI: https://opensource.org/licenses/MIT

Expand Down
2 changes: 2 additions & 0 deletions sass/base/_helpers.scss
Expand Up @@ -122,9 +122,11 @@ html,
*,
*:before,
*:after {
/* autoprefixer: ignore next */
box-sizing: border-box;
}

img {
/* autoprefixer: ignore next */
box-sizing: content-box;
}
5 changes: 3 additions & 2 deletions sass/base/_normalize.scss
Expand Up @@ -5,12 +5,10 @@

/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/

html {
line-height: 1.15; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
}

/* Sections
Expand Down Expand Up @@ -43,6 +41,7 @@ h1 {
*/

hr {
/* autoprefixer: ignore next */
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
Expand Down Expand Up @@ -230,6 +229,7 @@ fieldset {
*/

legend {
/* autoprefixer: ignore next */
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
Expand Down Expand Up @@ -261,6 +261,7 @@ textarea {

[type="checkbox"],
[type="radio"] {
/* autoprefixer: ignore next */
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
Expand Down
2 changes: 2 additions & 0 deletions sass/extra/_slick.scss
Expand Up @@ -172,6 +172,8 @@
.slider {
position: relative;
display: block;

/* autoprefixer: ignore next */
box-sizing: border-box;
user-select: none;
touch-action: pan-y;
Expand Down
20 changes: 10 additions & 10 deletions sass/extra/_sticky-nav.scss
Expand Up @@ -31,18 +31,18 @@ $navheight-collapsed: 54px;
.site-header {
padding-top: 5px;
padding-bottom: 5px;
}

.site-title {
svg {
position: relative;
top: 5px;
width: 32px;
height: 32px;
}
.site-title svg {
position: relative;
top: 5px;
width: 32px;
height: 32px;
}

@media (max-width: $responsivenav - 1px) {
margin-top: 0;
}
@media (max-width: $responsivenav - 1px) {
.site-title {
margin-top: 0;
}
}

Expand Down
1 change: 0 additions & 1 deletion sass/layout/_typography.scss
Expand Up @@ -27,7 +27,6 @@ body {
color: $color-body;

// Font smoothing options
font-smoothing: antialiased;
text-size-adjust: none;
text-rendering: geometricPrecision;
-webkit-font-smoothing: antialiased;
Expand Down
6 changes: 0 additions & 6 deletions sass/navigation/_nav-desktop.scss
Expand Up @@ -62,14 +62,12 @@ $absolute-navigation: false;

[data-whatinput="keyboard"] .sub-menu {
transition: none;
transition-delay: none;
transform: none;
}

[data-whatinput="mouse"] .nav-primary ul .menu-item-has-children,
[data-whatintent="mouse"] .nav-primary ul .menu-item-has-children {
&:focus > .sub-menu,
&:focus-within > .sub-menu,
&:hover > .sub-menu {
visibility: visible;
opacity: 1;
Expand All @@ -91,11 +89,9 @@ $absolute-navigation: false;
transform: translateY(-2em);
z-index: -1;
transition: none;
transition-delay: none;
}

.nav-primary ul .menu-item-has-children:focus > .sub-menu,
.nav-primary ul .menu-item-has-children:focus-within > .sub-menu,
.nav-primary ul .menu-item-has-children:hover > .sub-menu {
visibility: visible;
opacity: 1;
Expand All @@ -115,7 +111,6 @@ $absolute-navigation: false;
transform: translateY(1.5rem);
z-index: -1;
transition: none;
transition-delay: none;
list-style-type: none;
list-style: none;

Expand All @@ -134,7 +129,6 @@ $absolute-navigation: false;

.nav-primary ul .menu-item-has-children {
&:focus > .sub-menu,
&:focus-within > .sub-menu,
&:hover > .sub-menu {
visibility: visible;
opacity: 1;
Expand Down
4 changes: 2 additions & 2 deletions style.css
Expand Up @@ -4,7 +4,7 @@ Theme URI: https://github.com/digitoimistodude/air-light
Author: Digitoimisto Dude Oy
Author URI: https://www.dude.fi
Description: A minimalist WordPress starter theme.
Version: 4.4.3
Version: 4.4.4
License: MIT License
License URI: https://github.com/digitoimistodude/air-light/blob/master/LICENSE.md
Text Domain: air-light
Expand All @@ -19,6 +19,6 @@ Tags: one-column, accessibility-ready, translation-ready
* @link https://github.com/Automattic/_s/commits/master
*
* @author Roni Laukkarinen (https://github.com/ronilaukkarinen), Timi Wahalahti (https://github.com/timiwahalahti)
* @version 13.11.2018
* @version 14.11.2018
* @since 28.01.2016
*/

0 comments on commit fa21d12

Please sign in to comment.