-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Tools to build CSS from Sass #1149
Description
We have previously discussed build tools for the CSS from Sass. In 2014 we decided against as we wanted to keep _s tool agnostic. #585, #1097, #1002, #661
we will probably revisit once Automattic/underscores.me#31 got resolved
As it has been 2.5 years since that discussion I would like to propose a different solution.
Before merging pull requests related to CSS we need to be able to test that the Sass to CSS conversion is working properly. To be able to this properly every maintainer would need to have create a build tasks locally. Which is related to a previous discussion #615
What I propose we document the following command which does that without needing grunt or gulp or any other build system.
node-sass --include-path scss sass/style.scss style.css --output-style=expanded --indent-type=tab --indent-width=1
The only requirements for this is node and npm install node-sass which most developers are already using.
After running this command I got the following changes. I have removed some of the code style changes that have not been factored in. I think adding another check to travis for CSS code styling is another issue that we should look at in another issue. Partially mentioned in #1146 and previously discussed in #936
--- style.css
+++ style.css
@@ -49,7 +49,7 @@ Nicolas Gallagher and Jonathan Neal http://necolas.github.io/normalize.css/
html {
font-family: sans-serif;
-webkit-text-size-adjust: 100%;
- -ms-text-size-adjust: 100%;
+ -ms-text-size-adjust: 100%;
}
body {
@@ -426,7 +426,7 @@ input[type="submit"] {
border-color: #ccc #ccc #bbb;
border-radius: 3px;
background: #e6e6e6;
- color: rgba(0, 0, 0, .8);
+ color: rgba(0, 0, 0, 0.8);
font-size: 12px;
font-size: 0.75rem;
line-height: 1;
@@ -473,10 +473,6 @@ textarea {
padding: 3px;
}
-select {
- border: 1px solid #ccc;
-}
-
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
@@ -496,6 +492,10 @@ textarea:focus {
color: #111;
}
+select {
+ border: 1px solid #ccc;
+}
+
textarea {
width: 100%;
}
@@ -546,16 +546,6 @@ a:active {
padding-left: 0;
}
-.main-navigation li {
- float: left;
- position: relative;
-}
-
-.main-navigation a {
- display: block;
- text-decoration: none;
-}
-
.main-navigation ul ul {
box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2);
float: left;
@@ -570,24 +560,13 @@ a:active {
top: 0;
}
-.main-navigation ul ul a {
- width: 200px;
-}
-
-.main-navigation ul ul li {
-
-}
-
-.main-navigation li:hover > a,
-.main-navigation li.focus > a {
-}
-
-.main-navigation ul ul :hover > a,
-.main-navigation ul ul .focus > a {
+.main-navigation ul ul li:hover > ul,
+.main-navigation ul ul li.focus > ul {
+ left: 100%;
}
-.main-navigation ul ul a:hover,
-.main-navigation ul ul a.focus {
+.main-navigation ul ul a {
+ width: 200px;
}
.main-navigation ul li:hover > ul,
@@ -595,15 +574,14 @@ a:active {
left: auto;
}
-.main-navigation ul ul li:hover > ul,
-.main-navigation ul ul li.focus > ul {
- left: 100%;
+.main-navigation li {
+ float: left;
+ position: relative;
}
-.main-navigation .current_page_item > a,
-.main-navigation .current-menu-item > a,
-.main-navigation .current_page_ancestor > a,
-.main-navigation .current-menu-ancestor > a {
+.main-navigation a {
+ display: block;
+ text-decoration: none;
}
/* Small menu. */
@@ -818,7 +796,7 @@ object {
}
/* Make sure logo link wraps around logo image. */
-.custom-logo-link{
+.custom-logo-link {
display: inline-block;
}