Skip to content

Commit 9893db0

Browse files
committed
refactor, add dynamic word wrap for code blocks
1 parent f3afccd commit 9893db0

File tree

1 file changed

+15
-34
lines changed

1 file changed

+15
-34
lines changed

media/css/confluence.css

Lines changed: 15 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
body {
2-
font-family: -apple-system,
3-
BlinkMacSystemFont,
4-
"Segoe UI",
5-
Roboto,
6-
Helvetica,
7-
Arial,
8-
sans-serif,
9-
"Apple Color Emoji",
10-
"Segoe UI Emoji",
11-
"Segoe UI Symbol";
12-
font-size: 14px;
2+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
133
padding: 0 26px;
144
line-height: 1em;
155
word-wrap: break-word;
@@ -24,11 +14,7 @@ a {
2414
color: #4080D0;
2515
text-decoration: none;
2616
}
27-
28-
a:focus,
29-
input:focus,
30-
select:focus,
31-
textarea:focus {
17+
a:focus, input:focus, select:focus, textarea:focus {
3218
outline: 1px solid -webkit-focus-ring-color;
3319
outline-offset: -1px;
3420
}
@@ -46,9 +32,7 @@ h1 {
4632
border-bottom-style: solid;
4733
}
4834

49-
h1,
50-
h2,
51-
h3 {
35+
h1, h2, h3 {
5236
font-weight: normal;
5337
}
5438

@@ -58,29 +42,26 @@ blockquote {
5842
border-left: 5px solid;
5943
}
6044

61-
table,
62-
th,
63-
td {
45+
table, th, td {
6446
border: 1px solid;
6547
border-collapse: collapse;
6648
padding: 7px;
6749
}
6850

69-
pre>code {
70-
display: inline-block;
71-
width: 90%;
72-
color: white;
51+
pre > code {
52+
display: block;
53+
background:rgba(0, 0, 0, 0.15);
54+
word-wrap: break-word;
55+
overflow-wrap: break-word;
56+
word-break: break-all;
57+
white-space: normal;
7358
margin: 0px 5px;
74-
font-size: 14px;
75-
background-color: black;
76-
cursor: pointer;
7759
padding: 5px 1em;
78-
box-shadow: 1px 1px 1px rgba(0, 0, 0, .25);
7960
line-height: 1.5em;
8061
}
8162

8263
pre > code > p {
83-
margin: 0px
64+
margin: 0px;
8465
}
8566

8667
ul {
@@ -95,10 +76,10 @@ ol.initial {
9576
list-style: decimal;
9677
}
9778

98-
ol.initial>ol {
79+
ol.initial > ol {
9980
list-style-type: lower-alpha;
10081
}
10182

102-
ol.initial>ol>ol {
83+
ol.initial > ol > ol {
10384
list-style-type: lower-roman;
104-
}
85+
}

0 commit comments

Comments
 (0)