xref: /template/ad-hominem/css/content.less (revision 7c865ba571c136612adcb2a76921caeca02d107e)
1/**
2 * This contains the content styling
3 * @author Sascha Leib <sascha@leib.be>
4 */
5
6body {
7	overflow: hidden auto;
8}
9
10main p,
11main blockquote,
12main div.table {
13	margin-bottom:	1em;
14}
15
16/* headlines: */
17main h1, main h2, main h3, main h4, main h5, main h6 {
18	font-family:	@ini_alt_fonts;
19	color:			@ini_headlines;
20	margin:			1em 0 1em 0;
21	line-height:	1.1em;
22}
23
24main h1 { font-size: 2em; }
25main h2 { font-size: 1.5em; }
26main h3 { font-size: 1.125em; }
27main h4 { font-size: 1em; }
28main h5 { font-size: .875em; }
29main h6 { font-size: .75em; }
30
31main h1 *, main h2 *, main h3 *, main h4 *, main h5 *, main h6 * {
32	font-family:	inherit;
33	font-size:		inherit;
34	color:			inherit;
35	margin:			inherit;
36	line-height:	inherit;
37}
38
39/* on the homepage only, reduce the H1 top margin: */
40body.home h1:first-child { margin-top: .5em; }
41
42/* make strike-through and underline more useful! */
43main u {
44	-webkit-text-decoration-color: #F30;
45	-webkit-text-decoration-line: underline;
46	-webkit-text-decoration-style: wavy;
47	-webkit-text-decoration-thickness: .7pt;
48	text-decoration: underline #F30 wavy .7pt;
49}
50main s,
51main del {
52	-webkit-text-decoration-color: rgba(255,0,0,.5);
53	-webkit-text-decoration-line: line-through;
54	-webkit-text-decoration-style: solid;
55	-webkit-text-decoration-thickness: .1em;
56	text-decoration: line-through rgba(255,0,0,.5) solid .1em;
57}
58
59/* lists: */
60main ul, main ol {
61	margin:			0 2em 1em 1em;
62	padding-left:	1.75em;
63}
64main ul { list-style: square outside; }
65main ul ul { list-style-type: disc; }
66main ul ul ul { list-style-type: none; }
67main ul ul ul li {margin-left: 1em; }
68main ul ul ul li:before { display: block; content: '\2043'; text-align:center; float: left; width: 1em; margin-left: -1em; }
69main ul ul ul ul li:before { content: '\FE63' }
70main ul ul ul ul ul li:before { content: '\00B7' }
71
72/* numbered lists vary by nestling: */
73main ol { list-style: decimal outside; }
74main ol ol { list-style-type: lower-alpha; }
75main ol ol ol { list-style-type: lower-roman; }
76main ol ol ol ol { list-style-type: lower-greek; }
77main ol ol ol ol ol { list-style-type: decimal-leading-zero; }
78main ul ul ul ol li { margin-left: 0; }
79main ul ul ul ol li:before { display: none; content: ''; }
80
81main li::marker {
82	color:			#666;
83}
84
85main ul ul, main ul ol,
86main ol ul, main ol ol {
87	margin-bottom:		0;
88	padding-left:		.25em;
89}
90
91/* horizontal rules */
92main hr {
93	border:				#666 solid 0;
94	border-top-width:	1pt;
95	height:				0;
96	margin:				3pt 0;
97}
98
99main tt, main blockquote tt,
100main pre, main pre *,
101main code, main code *,
102main blockquote code {
103	font-family:	@ini_mono_fonts;
104}
105main code, main blockquote code {
106	border:			@ini_border solid 1px;
107	border-radius:	3pt;
108	padding:		0 2pt;
109}
110main pre {
111	max-width: calc(@ini_site_width - @ini_sidebar_width);
112	overflow: auto;
113	word-wrap: normal;
114	border: 1px solid @ini_border;
115	border-radius: 2px;
116	box-shadow: inset 0 0 .5em @ini_border;
117	padding: .3em;
118}
119
120/* quotes: */
121main blockquote {
122	border-left:	@ini_blockquote solid .4em;
123	border-radius:	.5em;
124	padding:		.25em 0 .25em .75em;
125	margin:			0 2em 1em 1em;
126	font-family:	@ini_alt_fonts;
127	font-size:		1.1rem;
128}
129main blockquote * {
130	font-family:	@ini_alt_fonts;
131	font-size:		1.1rem;
132}
133
134main svg {
135	display:			block;
136	fill-rule:			evenodd;
137	clip-rule:			evenodd;
138	stroke-linejoin:	round;
139	stroke-miterlimit:	1.5;
140}
141main svg.math {
142	margin-left:		15px
143}
144
145/*  tables */
146main div.table {
147    overflow-x:			auto;
148}
149
150main table {
151    border-collapse:	collapse;
152    empty-cells:		show;
153    border-spacing:		0;
154	font-size:			smaller;
155    border:				1px solid @ini_border;
156	margin-bottom:		1em;
157}
158
159main table.inline {
160    min-width:			50%;
161}
162
163main table th,
164main table td {
165	padding:			.5em .3em;
166	vertical-align:		top;
167	border:				1px solid @ini_border;
168	line-height:		1.25em;
169}
170main table th {
171	font-weight:		bold;
172	background-color:	@ini_background_alt;
173	text-align:			left;
174}
175
176main table.inline tr:hover td {
177    background-color:	@ini_background_alt;
178}
179
180main table.inline tr:hover th {
181    background-color:	@ini_border;
182}
183
184/* asides */
185main aside {
186	width:			50%;
187	max-width:		220px;
188	min-width:		150px;
189	float:			right;
190	text-align:		center;
191	font-size:		smaller;
192	margin-left:	.5em;
193	font-size:		small;
194	line-height:	1.5em;
195}
196main aside footer {
197	line-height:	1.1em;
198}
199
200/* images */
201main img {
202	max-width:		100%;
203	height:			auto;
204}
205
206/* tablet break point: */
207@media (max-width: @ini_tablet_width) {
208
209	/* use hyphenation rules */
210	main p {
211		hyphens: auto;
212		-webkit-hyphens: auto;
213		hyphenate-limit-chars: 6 2 3;
214		-ms-hyphenate-limit-chars: 6 2 3;
215		-webkit-hyphenate-limit-before: 2;
216		-webkit-hyphenate-limit-after: 3;
217		hyphenate-limit-lines: 3;
218		-ms-hyphenate-limit-lines: 3;
219		hyphenate-limit-last: always;
220		-ms-hyphenate-limit-last: always;
221		hyphenate-limit-zone: 8%;
222		-ms-hyphenate-limit-zone: 8%;
223	}
224}
225
226/* phone break point: */
227@media (max-width: @ini_phone_width) {
228
229	.nophone {
230		display: none !important;
231	}
232
233	main aside {
234		width:			100%;
235		max-width:		initial;
236		float:			none;
237		margin-left:	0;
238	}
239}
240
241/* dark mode overrides */
242@media (prefers-color-scheme: dark) {
243	body.darkmode main h1, body.darkmode main h2,
244	body.darkmode main h3, body.darkmode main h4,
245	body.darkmode main h5, body.darkmode main h6 { color: @ini_headlines_dark; }
246	body.darkmode main table { border-color: @ini_border_dark; }
247	body.darkmode main table th { background-color: rgba(255,255,255,0.05); }
248	body.darkmode main table.inline tr:hover td,
249	body.darkmode #acl_manager table tr:hover { background-color: rgba(255,255,255,0.1); }
250	body.darkmode main code, main blockquote code { border-color: @ini_border_dark; }
251	body.darkmode main table.inline tr:hover th { background-color: @ini_border_dark; }
252	body.darkmode main blockquote { border-left-color: @ini_blockquote_dark }
253
254	body.darkmode div.error { background-color: #4B2F36; color: #FFB3D2; border-color: #743E4C; }
255	body.darkmode div.success { background-color: #28381F; color: #FBE2A1; border-color: #37562E; }
256	body.darkmode div.notify { background-color: #42381F; color: #FCE2A1; border-color: #56562E; }
257	body.darkmode main pre { border-color: @ini_border_dark; box-shadow: inset 0 0 .5em @ini_border_dark;}
258
259}
260
261