Skip to content

Commit

Permalink
fix(style): link color and wrap style (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonzq authored Apr 29, 2020
1 parent fa4c567 commit 4f96582
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 20 deletions.
6 changes: 6 additions & 0 deletions assets/css/_mixin/_compatibility.scss
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,9 @@
word-wrap: $value;
overflow-wrap: $value;
}

@mixin line-break($value) {
-webkit-line-break: $value;
-ms-line-break: $value;
line-break: $value;
}
2 changes: 1 addition & 1 deletion assets/css/_mixin/_link.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@mixin link($light, $dark) {
a {
a, a::before, a::after {
color: if($light, $global-link-color, $single-link-color);

[theme=dark] & {
Expand Down
18 changes: 3 additions & 15 deletions assets/css/_mixin/_summary.scss
Original file line number Diff line number Diff line change
Expand Up @@ -72,29 +72,17 @@
h5,
h6 {
line-height: 2;

&::before {
content: "|";
margin-right: .3125rem;
color: $global-link-color;

[theme=dark] & {
color: $global-link-color-dark;
}
}
}

h2 {
font-size: 1.2rem;

&::before {
content: "#";
}
}

@include link(true, true);
@include link(false, true);

b, strong {
color: $global-font-secondary-color;

[theme=dark] & {
color: $global-font-secondary-color-dark;
}
Expand Down
1 change: 1 addition & 0 deletions assets/css/_page/_single.scss
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@

a {
@include overflow-wrap(break-word);
@include line-break(anywhere);

[theme=dark] & b, [theme=dark] & strong {
color: $single-link-color-dark;
Expand Down
1 change: 1 addition & 0 deletions assets/css/_partial/_single/_code.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ code {
max-width: 100%;
padding: 0 .4rem;
@include overflow-wrap(break-word);
@include line-break(anywhere);
font-size: $code-font-size;
font-family: $code-font-family;
color: $code-color;
Expand Down
2 changes: 1 addition & 1 deletion assets/css/_partial/_single/_toc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
padding-left: .8rem;
list-style: none;

a::before {
a:first-child::before {
content: "|";
font-weight: bolder;
margin-right: .5rem;
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit 4f96582

Please sign in to comment.