Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
fix(code): inline code overflow-wrap (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonzq authored Apr 28, 2020
1 parent 16a4e94 commit 072b962
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion assets/css/_core/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ html {
body {
background-color: $global-background-color;
color: $global-font-color;
overflow-wrap: break-word;
@include overflow-wrap(break-word);
scrollbar-color: auto;

&[theme=dark] {
Expand Down
5 changes: 5 additions & 0 deletions assets/css/_mixin/_compatibility.scss
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,8 @@
-moz-appearance: $value;
-webkit-appearance: $value;
}

@mixin overflow-wrap($value) {
word-wrap: $value;
overflow-wrap: $value;
}
2 changes: 1 addition & 1 deletion assets/css/_mixin/_summary.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
overflow-wrap: break-word;
@include overflow-wrap(break-word);
color: $global-font-secondary-color;

[theme=dark] & {
Expand Down
3 changes: 1 addition & 2 deletions assets/css/_page/_single.scss
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@
@include link(false, false);

a {
word-break: break-all;
word-break: break-word;
@include overflow-wrap(break-word);

[theme=dark] & b, [theme=dark] & strong {
color: $single-link-color-dark;
Expand Down
2 changes: 1 addition & 1 deletion assets/css/_partial/_archive/_tags.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
display: inline-block;
position: relative;
margin: 5px 10px;
overflow-wrap: break-word;
@include overflow-wrap(break-word);
@include transition(all ease-out 0.3s);

&:active,
Expand Down
2 changes: 1 addition & 1 deletion assets/css/_partial/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ header {
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
overflow-wrap: break-word;
@include overflow-wrap(break-word);
color: $global-font-secondary-color;

[theme=dark] & {
Expand Down
4 changes: 3 additions & 1 deletion assets/css/_partial/_single/_code.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
code {
display:inline-block;
max-width: 100%;
padding: 0 .4rem;
@include overflow-wrap(break-word);
font-size: $code-font-size;
font-family: $code-font-family;
color: $code-color;
padding: 0 .4rem;

[theme=dark] & {
color: $code-color-dark;
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 @@ -53,7 +53,7 @@
width: $MAX_LENGTH;
padding: 0 .8rem;
border-left: 4px solid $global-border-color;
overflow-wrap: break-word;
@include overflow-wrap(break-word);
box-sizing: border-box;
top: if($header-normal-mode-desktop, 5rem, 10rem);
left: $MAX_LENGTH;
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 072b962

Please sign in to comment.