Clean up LESS/SCSS Unit Tests and update Prettydiff

Fixes #181 and fixes #180.
This commit is contained in:
Glavin Wiechert 2015-02-02 12:26:40 -04:00
parent 617317afcc
commit a50c5a3c4c
9 changed files with 27 additions and 40 deletions

View File

@ -1,6 +1,5 @@
a { a {
line-height: @headerHeight; line-height: @headerHeight;
display: block; display: block;
padding: 0 15px; padding: 0 15px;
font-size: 16px; font-size: 16px;
@ -9,23 +8,18 @@ a {
} }
&:link { &:link {
color: @white; color: @white;
text-decoration: none; text-decoration: none;
} }
&:visited { &:visited {
color: @white; color: @white;
} }
&:hover { &:hover {
color: @orange; color: @orange;
} }
&.green { &.green {
color: @green; color: @green;
&:hover { &:hover {
color: @white; color: @white;
background-color: @green; background-color: @green;
} }
} }

View File

@ -1,7 +1,6 @@
// main: style.less // main: style.less
@import (reference)"variables.less"; @import (reference)"variables.less";
@import (reference)"mixins.less"; @import (reference)"mixins.less";
.modal { .modal {
position: fixed; position: fixed;
height: 100%; height: 100%;
@ -10,7 +9,6 @@
z-index: 10; z-index: 10;
opacity: 0; opacity: 0;
display: none; display: none;
.innerModal { .innerModal {
margin: auto; margin: auto;
background-color: @white; background-color: @white;
@ -20,24 +18,20 @@
-ms-transform: translateY(-100%); -ms-transform: translateY(-100%);
-o-transform: translateY(-100%); -o-transform: translateY(-100%);
transform: translateY(-100%); transform: translateY(-100%);
.fa { .fa {
float: right; float: right;
color: @white; color: @white;
background-color: firebrick; background-color: firebrick;
padding: 5px 7px; padding: 5px 7px;
border-radius: 20px; border-radius: 20px;
&:hover { &:hover {
background-color: lighten(@black, 50%); background-color: lighten(@black, 50%);
cursor: pointer; cursor: pointer;
} }
&:active { &:active {
background-color: lighten(@black, 25%); background-color: lighten(@black, 25%);
} }
} }
} }
&.modal-2text { &.modal-2text {
.innerModal { .innerModal {
@ -47,10 +41,8 @@
padding: 10px 25px; padding: 10px 25px;
background-color: gainsboro; background-color: gainsboro;
border-radius: 4px; border-radius: 4px;
h2 { h2 {
margin: 0 0 7px; margin: 0 0 7px;
} }
div { div {
height: 70%; height: 70%;
@ -58,14 +50,12 @@
background-color: @white; background-color: @white;
padding: 15px; padding: 15px;
border-radius: 4px; border-radius: 4px;
} }
.large-cta { .large-cta {
margin-top: 25px; margin-top: 25px;
} }
} }
} }
} }
#modal-video { #modal-video {
.innerModal { .innerModal {
@ -73,95 +63,76 @@
margin-top: 30px; margin-top: 30px;
width: 1000px; width: 1000px;
background-color: lighten(@black, 25%); background-color: lighten(@black, 25%);
iframe { iframe {
width: 600px; width: 600px;
height: 340px; height: 340px;
margin: 2% auto; margin: 2% auto;
} }
//container //container
> div { > div {
text-align: center; text-align: center;
a { a {
.styleLinks(@white, darken(@white, 10%)); .styleLinks(@white, darken(@white, 10%));
padding: 5px; padding: 5px;
text-transform: uppercase; text-transform: uppercase;
&:hover { &:hover {
background-color: fade(@white, 15%); background-color: fade(@white, 15%);
} }
&:active { &:active {
background-color: fade(@white, 30%); background-color: fade(@white, 30%);
} }
} }
h3 { h3 {
color: @white; color: @white;
font-size: 3em; font-size: 3em;
margin: 20px auto; margin: 20px auto;
} }
button { button {
margin-bottom: 50px; margin-bottom: 50px;
} }
} }
} }
} }
.slideIn { .slideIn {
.animation(SlideIn, 0.5s); .animation(SlideIn, 0.5s);
} }
@-webkit-keyframes SlideIn { @-webkit-keyframes SlideIn {
0% { 0% {
.transform(translateY(-100%)); .transform(translateY(-100%));
} }
100% { 100% {
.transform(translateY(0px)); .transform(translateY(0px));
} }
} }
.fadeIn { .fadeIn {
display: block; display: block;
.animation(FadeIn, 0.5s); .animation(FadeIn, 0.5s);
} }
@-webkit-keyframes FadeIn { @-webkit-keyframes FadeIn {
0% { 0% {
opacity: 0; opacity: 0;
} }
100% { 100% {
opacity: 1; opacity: 1;
} }
} }
.slideOut { .slideOut {
.animation(SlideOut, 0.5s); .animation(SlideOut, 0.5s);
} }
@-webkit-keyframes SlideOut { @-webkit-keyframes SlideOut {
0% { 0% {
.transform(translateY(0%)); .transform(translateY(0%));
} }
100% { 100% {
.transform(translateY(-100%)); .transform(translateY(-100%));
} }
} }
.fadeOut { .fadeOut {
.animation(FadeOut, 0.5s); .animation(FadeOut, 0.5s);
} }
@-webkit-keyframes FadeOut { @-webkit-keyframes FadeOut {
0% { 0% {
opacity: 1; opacity: 1;
} }
100% { 100% {
opacity: 0; opacity: 0;

View File

@ -1,12 +1,10 @@
// Breaks (fixed now) // Breaks (fixed now)
.mixin(@variable, @anotherVariable) { .mixin(@variable, @anotherVariable) {
} }
// Works // Works
.mixin(@variable; @anotherVariable) { .mixin(@variable; @anotherVariable) {
} }
// Ok // Ok
.mixin(@variable) { .mixin(@variable) {

View File

@ -1,7 +1,6 @@
section#photo-details { section#photo-details {
width: 1140px; width: 1140px;
margin: 60px auto 70px; margin: 60px auto 70px;
} }
div.photo-view { div.photo-view {
text-align: center; text-align: center;

View File

@ -0,0 +1,11 @@
// https://github.com/Glavin001/atom-beautify/issues/181
.ttl {
margin-bottom: 10px;
}
// https://github.com/Glavin001/atom-beautify/issues/180
.a {
color: #fff;
.b {
color: #999;
}
}

View File

@ -0,0 +1,14 @@
// https://github.com/Glavin001/atom-beautify/issues/181
.ttl {
margin-bottom: 10px;
}
// https://github.com/Glavin001/atom-beautify/issues/180
.a {
color: #fff;
.b {
color: #999;
}
}

View File

@ -422,7 +422,7 @@ module.exports =
text = beautifyCSS(text, self.getOptions("css", allOptions)) text = beautifyCSS(text, self.getOptions("css", allOptions))
beautifyCompleted text beautifyCompleted text
when "Sass", "SCSS", "LESS" when "Sass", "SCSS", "LESS"
beautifyLESS ?= require("./langs/less-beautify") beautifyLESS ?= require("./langs/css-prettydiff-beautify")
beautifyLESS text, self.getOptions("css", allOptions), beautifyCompleted beautifyLESS text, self.getOptions("css", allOptions), beautifyCompleted
when "SQL (Rails)", "SQL" when "SQL (Rails)", "SQL"
beautifySQL ?= require("./langs/sql-beautify") beautifySQL ?= require("./langs/sql-beautify")

View File

@ -56,7 +56,7 @@
"loophole": "^1.0.0", "loophole": "^1.0.0",
"node-dir": "^0.1.6", "node-dir": "^0.1.6",
"node-uuid": "^1.4.1", "node-uuid": "^1.4.1",
"prettydiff": "^1.6.13", "prettydiff": "^1.8.8",
"space-pen": "^4.3.0", "space-pen": "^4.3.0",
"strip-json-comments": "^0.1.3", "strip-json-comments": "^0.1.3",
"temp": "^0.8.0", "temp": "^0.8.0",