Merge pull request #1085 from albell/master

CSS: Add newline between selectors by default
This commit is contained in:
Glavin Wiechert 2016-07-30 22:22:16 -03:00 committed by GitHub
commit 7bad8c2b14
11 changed files with 92 additions and 32 deletions

View File

@ -1417,6 +1417,7 @@ Path to uncrustify config file. i.e. uncrustify.cfg (Supported by Uncrustify)
| `align_assignments` | :x: | :x: | :white_check_mark: |
| `configPath` | :white_check_mark: | :x: | :x: |
| `convert_quotes` | :x: | :x: | :white_check_mark: |
| `end_with_newline` | :x: | :white_check_mark: | :x: |
| `force_indentation` | :x: | :x: | :white_check_mark: |
| `indent_char` | :x: | :white_check_mark: | :white_check_mark: |
| `indent_comments` | :x: | :x: | :white_check_mark: |
@ -1563,6 +1564,30 @@ Convert the quote characters delimiting strings from either double or single quo
}
```
##### [End with newline](#end-with-newline)
**Namespace**: `css`
**Key**: `end_with_newline`
**Type**: `boolean`
**Supported Beautifiers**: [`JS Beautify`](#js-beautify)
**Description**:
End output with newline (Supported by JS Beautify)
**Example `.jsbeautifyrc` Configuration**
```json
{
"css": {
"end_with_newline": false
}
}
```
##### [Force indentation](#force-indentation)
**Namespace**: `css`
@ -1671,6 +1696,8 @@ Indentation size/length (Supported by JS Beautify, Pretty Diff)
**Key**: `newline_between_rules`
**Default**: `true`
**Type**: `boolean`
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff)
@ -1684,7 +1711,7 @@ Add a newline between CSS rules (Supported by JS Beautify, Pretty Diff)
```json
{
"css": {
"newline_between_rules": false
"newline_between_rules": true
}
}
```
@ -6006,6 +6033,8 @@ Indentation size/length (Supported by Pretty Diff)
**Key**: `newline_between_rules`
**Default**: `true`
**Type**: `boolean`
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
@ -6019,7 +6048,7 @@ Add a newline between CSS rules (Supported by Pretty Diff)
```json
{
"css": {
"newline_between_rules": false
"newline_between_rules": true
}
}
```
@ -8775,6 +8804,8 @@ Indentation size/length (Supported by Pretty Diff)
**Key**: `newline_between_rules`
**Default**: `true`
**Type**: `boolean`
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
@ -8788,7 +8819,7 @@ Add a newline between CSS rules (Supported by Pretty Diff)
```json
{
"css": {
"newline_between_rules": false
"newline_between_rules": true
}
}
```
@ -9158,6 +9189,8 @@ Indentation size/length (Supported by Pretty Diff)
**Key**: `newline_between_rules`
**Default**: `true`
**Type**: `boolean`
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
@ -9171,7 +9204,7 @@ Add a newline between CSS rules (Supported by Pretty Diff)
```json
{
"css": {
"newline_between_rules": false
"newline_between_rules": true
}
}
```
@ -10200,6 +10233,8 @@ Indentation size/length (Supported by Pretty Diff)
**Key**: `newline_between_rules`
**Default**: `true`
**Type**: `boolean`
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
@ -10213,7 +10248,7 @@ Add a newline between CSS rules (Supported by Pretty Diff)
```json
{
"css": {
"newline_between_rules": false
"newline_between_rules": true
}
}
```
@ -12791,6 +12826,8 @@ Add a newline between multiple selectors (Supported by JS Beautify)
**Key**: `newline_between_rules`
**Default**: `true`
**Type**: `boolean`
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff)
@ -12804,7 +12841,7 @@ Add a newline between CSS rules (Supported by JS Beautify, Pretty Diff)
```json
{
"css": {
"newline_between_rules": false
"newline_between_rules": true
}
}
```
@ -12861,6 +12898,30 @@ Maximum characters per line (0 disables) (Supported by JS Beautify, Pretty Diff)
}
```
##### [End with newline](#end-with-newline)
**Namespace**: `html`
**Key**: `end_with_newline`
**Type**: `boolean`
**Supported Beautifiers**: [`JS Beautify`](#js-beautify)
**Description**:
End output with newline (Supported by JS Beautify)
**Example `.jsbeautifyrc` Configuration**
```json
{
"html": {
"end_with_newline": false
}
}
```
##### [Indent inner html](#indent-inner-html)
**Namespace**: `html`
@ -13085,30 +13146,6 @@ List of tags (defaults to inline) that should not be reformatted (Supported by J
}
```
##### [End with newline](#end-with-newline)
**Namespace**: `html`
**Key**: `end_with_newline`
**Type**: `boolean`
**Supported Beautifiers**: [`JS Beautify`](#js-beautify)
**Description**:
End output with newline (Supported by JS Beautify)
**Example `.jsbeautifyrc` Configuration**
```json
{
"html": {
"end_with_newline": false
}
}
```
##### [Extra liners](#extra-liners)
**Namespace**: `html`
@ -14316,6 +14353,8 @@ Preserve line-breaks (Supported by Pretty Diff)
**Key**: `newline_between_rules`
**Default**: `true`
**Type**: `boolean`
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
@ -14329,7 +14368,7 @@ Add a newline between CSS rules (Supported by Pretty Diff)
```json
{
"css": {
"newline_between_rules": false
"newline_between_rules": true
}
}
```

View File

@ -4,24 +4,30 @@ a {
display: block;
padding: 0 15px;
font-size: 16px;
button {
font-size: 16px;
}
&:link {
color: @white;
text-decoration: none;
}
&:visited {
color: @white;
}
&:hover {
color: @orange;
}
&.green {
color: @green;
&:hover {
color: @white;

View File

@ -27,10 +27,12 @@
background-color: firebrick;
padding: 5px 7px;
border-radius: 20px;
&:hover {
background-color: lighten(@black, 50%);
cursor: pointer;
}
&:active {
background-color: lighten(@black, 25%);
}
@ -85,9 +87,11 @@
.styleLinks(@white, darken(@white, 10%));
padding: 5px;
text-transform: uppercase;
&:hover {
background-color: fade(@white, 15%);
}
&:active {
background-color: fade(@white, 30%);
}

View File

@ -1,4 +1,5 @@
// Breaks (fixed now)
.mixin(@variable, @anotherVariable) {}
// Works
.mixin(@variable; @anotherVariable) {}

View File

@ -5,11 +5,13 @@ section#photo-details {
div.photo-view {
text-align: center;
figure {
box-shadow: 0 0 3px 1px rgba(0,0,0,0.75);
display: inline-block;
margin: 0 0 60px;
padding: 0;
img {
display: block;
}

View File

@ -1,8 +1,10 @@
.animal {
color: red;
}
.dog {
&:extend(.animal);
&:hover {
color: green;
}

View File

@ -2,6 +2,7 @@
#{$parent} {
color: $color;
}
a#{$parent}:hover {
color: darken($color, 10%);
}

View File

@ -6,13 +6,16 @@
background-color: $gray-light;
box-shadow: none;
}
.k-slider-selection {
background-color: $brand-primary;
}
.k-button {
border: 1px solid $brand-primary;
background-color: transparent;
color: $brand-primary;
&:hover {
border-color: $brand-primary;
background-color: $brand-primary;

View File

@ -1,5 +1,6 @@
a {
line-height: 56px;
&:hover {
color: blue;
}

View File

@ -4,6 +4,7 @@
&:visited {
//whatever
}
&::before {
//whatever
}

View File

@ -45,7 +45,7 @@ module.exports = {
description: "Add a newline between multiple selectors"
newline_between_rules:
type: 'boolean'
default: false
default: true
description: "Add a newline between CSS rules"
preserve_newlines:
type: 'boolean'