Use double colons for "before" and "after" pseudo-elements

This commit is contained in:
postcasio 2015-02-16 16:33:30 +00:00 committed by Dominic Adelaar
parent ada4d5a036
commit 5489d7d351
7 changed files with 18 additions and 18 deletions

View File

@ -1,6 +1,6 @@
@import "ui-variables"; @import "ui-variables";
.icon:before { .icon::before {
margin-right: @component-icon-padding; margin-right: @component-icon-padding;
} }

View File

@ -68,7 +68,7 @@ body {
color: #eee; color: #eee;
} }
&:before { &::before {
content: "\02022"; content: "\02022";
} }
} }

View File

@ -25,10 +25,10 @@
white-space: nowrap; white-space: nowrap;
} }
// The background highlight uses :before rather than the item background so // The background highlight uses ::before rather than the item background so
// it can span the entire width of the parent container rather than the size // it can span the entire width of the parent container rather than the size
// of the list item. // of the list item.
.selected:before { .selected::before {
content: ''; content: '';
background-color: @background-color-selected; background-color: @background-color-selected;
position: absolute; position: absolute;
@ -42,7 +42,7 @@
position: relative; position: relative;
} }
.icon:before { .icon::before {
margin-right: @component-icon-padding; margin-right: @component-icon-padding;
position: relative; position: relative;
top: 1px; top: 1px;
@ -73,7 +73,7 @@
// Nested items always get disclosure arrows // Nested items always get disclosure arrows
.list-nested-item > .list-item { .list-nested-item > .list-item {
.octicon(chevron-down, @disclosure-arrow-size); .octicon(chevron-down, @disclosure-arrow-size);
&:before{ &::before{
position: relative; position: relative;
top: -1px; top: -1px;
margin-right: @component-icon-padding; margin-right: @component-icon-padding;
@ -81,7 +81,7 @@
} }
.list-nested-item.collapsed > .list-item { .list-nested-item.collapsed > .list-item {
.octicon(chevron-right, @disclosure-arrow-size); .octicon(chevron-right, @disclosure-arrow-size);
&:before{ &::before{
left: 1px; left: 1px;
} }
} }

View File

@ -6,7 +6,7 @@
.loading-message { .loading-message {
.octicon(hourglass); .octicon(hourglass);
&:before { &::before {
font-size: 1.1em; font-size: 1.1em;
width: 1.1em; width: 1.1em;
height: 1.1em; height: 1.1em;

View File

@ -62,7 +62,7 @@ atom-text-editor {
opacity: .6; opacity: .6;
padding: 0 .4em; padding: 0 .4em;
&:before { &::before {
text-align: center; text-align: center;
} }
} }
@ -84,7 +84,7 @@ atom-text-editor {
visibility: visible; visibility: visible;
&:before { &::before {
position: relative; position: relative;
left: -.1em; left: -.1em;
} }
@ -129,7 +129,7 @@ atom-text-editor {
.line { .line {
white-space: pre; white-space: pre;
&.cursor-line .fold-marker:after { &.cursor-line .fold-marker::after {
opacity: 1; opacity: 1;
} }
} }
@ -137,7 +137,7 @@ atom-text-editor {
.fold-marker { .fold-marker {
cursor: default; cursor: default;
&:after { &::after {
.icon(0.8em, inline); .icon(0.8em, inline);
content: @ellipsis; content: @ellipsis;

View File

@ -44,7 +44,7 @@
opacity: .6; opacity: .6;
padding: 0 .4em; padding: 0 .4em;
&:before { &::before {
text-align: center; text-align: center;
} }
} }
@ -66,7 +66,7 @@
visibility: visible; visibility: visible;
&:before { &::before {
position: relative; position: relative;
left: -.1em; left: -.1em;
} }
@ -111,7 +111,7 @@
.line { .line {
white-space: pre; white-space: pre;
&.cursor-line .fold-marker:after { &.cursor-line .fold-marker::after {
opacity: 1; opacity: 1;
} }
} }
@ -119,7 +119,7 @@
.fold-marker { .fold-marker {
cursor: default; cursor: default;
&:after { &::after {
.icon(0.8em, inline); .icon(0.8em, inline);
content: @ellipsis; content: @ellipsis;

View File

@ -18,7 +18,7 @@
.octicon(@name, @size: 16px) { .octicon(@name, @size: 16px) {
@import "octicon-utf-codes.less"; @import "octicon-utf-codes.less";
&:before { &::before {
.icon(@size); .icon(@size);
content: @@name content: @@name
} }
@ -26,7 +26,7 @@
.mega-octicon(@name, @size: 32px) { .mega-octicon(@name, @size: 32px) {
@import "octicon-utf-codes.less"; @import "octicon-utf-codes.less";
&:before { &::before {
.icon(@size); .icon(@size);
content: @@name content: @@name
} }