-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoc.scss
167 lines (131 loc) · 3.02 KB
/
doc.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
// file: doc.scss
// document layout rules
// This is part of the micro css implementation.
@use "base";
@use "card";
body.sitelayout {
display: grid;
grid-template-columns: auto;
grid-template-areas: "header" "main" "sidebar" "footer";
gap: var(--layout-gap);
max-width: var(--doc-body-width);
margin: 0 auto;
&:has(aside) {
grid-template-columns: auto var(--sidebar-width);
grid-template-areas: "header header" "main sidebar" "footer footer";
@media (width <=1000px) {
grid-template-areas: "header" "main" "sidebar" "footer";
}
}
header {
grid-area: header;
/* background-color: #f0f0f0; */
display: flex;
@media print {
display: none !important;
}
>* {
align-self: flex-end;
display: inline-block;
}
>*:not(:first-child) {
margin-left: var(--layout-gap);
}
>.logo {
font-size: 160%;
font-weight: bold;
}
a {
text-decoration: none;
width: 12ch;
text-align: center;
padding: 0.2ch 1ch;
transition: box-shadow 0.3s ease-in-out;
&:hover {
box-shadow: 0 5px 12px rgb(0 0 0 / 30%);
}
}
}
aside {
grid-area: sidebar;
background-color: lime;
padding: var(--layout-gap);
@media print {
display: none !important;
}
}
main {
grid-area: main;
container-name: main;
container-type: inline-size;
background-color: var(--content-back);
padding: var(--layout-gap);
}
footer {
grid-area: footer;
background-color: lightblue;
padding: var(--layout-gap);
}
}
h2 {
clear: both;
}
// Tables
table {
empty-cells: show;
border-collapse: collapse;
border-left: solid 1px #203050;
border-right: solid 1px #203050;
margin-top: 0.4em;
margin-bottom: 0.4em;
thead tr {
background-color: #203050;
th {
vertical-align: top;
padding: 0.2em 0.6em;
color: white;
font-weight: bold;
}
}
td {
vertical-align: top;
padding: 0.2em 0.6em;
border-bottom: 1px solid #203050;
}
}
img[title='w200'] {
width: 200px;
}
img[title='w400'] {
width: 400px;
}
img[title='w600'] {
width: 600px;
}
.warning {
margin: 0.2rem;
padding: 0.4rem;
border-radius: 0.4rem;
}
// mark links to external sites
a[href^='http']::after {
content: '';
display: inline-block;
width: 1em;
height: 1em;
vertical-align: text-bottom;
margin-left: 0.25em;
background-size: 1em;
background-image: url("data:image/svg+xml, %3Csvg viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M22.689 4v4.918h13.114l-17.049 17.05 3.279 3.606 17.377-17.05v12.787H44V4z' /%3E%3Cpath d='M33 22.99V40H8V15h17v-4l-21 .001V44h33V22.952z' /%3E%3C/svg%3E");
}
// formatted code blocks
@media print {
html,
body {
font-size: 0.66em;
background-color: white;
}
.short {
border: 1px solid silver;
}
}