Skip to content

Commit f73dc29

Browse files
author
Florian Kissling
committed
Move most of the default CSS to partials/Sass.
1 parent a2b31e2 commit f73dc29

11 files changed

Lines changed: 447 additions & 327 deletions

docs/_includes/head.html

Lines changed: 1 addition & 327 deletions
Original file line numberDiff line numberDiff line change
@@ -18,330 +18,4 @@
1818
<link href="vendor/css/font-awesome.min.css" type="text/css" rel="stylesheet" />
1919
<link href="vendor/css/prettify.css" type="text/css" rel="stylesheet" />
2020
<link href="vendor/css/anchor.css" type="text/css" rel="stylesheet" />
21-
22-
<style type="text/css">
23-
/*
24-
* Side navigation
25-
*
26-
* Scrollspy and affixed enhanced navigation to highlight sections and secondary
27-
* sections of docs content.
28-
*/
29-
30-
/* By default it's not affixed in mobile views, so undo that */
31-
.s2-docs-sidebar.affix {
32-
position: static;
33-
}
34-
@media (min-width: 768px) {
35-
.s2-docs-sidebar {
36-
padding-left: 20px;
37-
}
38-
}
39-
40-
/* First level of nav */
41-
.s2-docs-sidenav {
42-
margin-top: 20px;
43-
margin-bottom: 20px;
44-
}
45-
46-
/* All levels of nav */
47-
.s2-docs-sidebar .nav > li > a {
48-
margin-left: -1px;
49-
display: block;
50-
padding: 4px 20px;
51-
font-size: 13px;
52-
font-weight: 500;
53-
color: #767676;
54-
}
55-
.s2-docs-sidebar .nav > li > a code {
56-
background-color: inherit;
57-
color: #666;
58-
}
59-
.s2-docs-sidebar .nav > li > a:hover,
60-
.s2-docs-sidebar .nav > li > a:focus {
61-
padding-left: 19px;
62-
color: #428BCA;
63-
text-decoration: none;
64-
background-color: transparent;
65-
border-left: 1px solid #428BCA;
66-
}
67-
.s2-docs-sidebar .nav > .active > a,
68-
.s2-docs-sidebar .nav > .active:hover > a,
69-
.s2-docs-sidebar .nav > .active:focus > a {
70-
padding-left: 18px;
71-
font-weight: bold;
72-
color: #428BCA;
73-
background-color: transparent;
74-
border-left: 2px solid #428BCA;
75-
}
76-
77-
/* Nav: second level (shown on .active) */
78-
.s2-docs-sidebar .nav .nav {
79-
display: none; /* Hide by default, but at >768px, show it */
80-
padding-bottom: 10px;
81-
}
82-
.s2-docs-sidebar .nav .nav > li > a {
83-
padding-top: 1px;
84-
padding-bottom: 1px;
85-
padding-left: 30px;
86-
font-size: 12px;
87-
font-weight: normal;
88-
}
89-
.s2-docs-sidebar .nav .nav > li > a:hover,
90-
.s2-docs-sidebar .nav .nav > li > a:focus {
91-
padding-left: 29px;
92-
}
93-
.s2-docs-sidebar .nav .nav > .active > a,
94-
.s2-docs-sidebar .nav .nav > .active:hover > a,
95-
.s2-docs-sidebar .nav .nav > .active:focus > a {
96-
padding-left: 28px;
97-
font-weight: 500;
98-
}
99-
100-
/* Back to top (hidden on mobile) */
101-
.back-to-top,
102-
.s2-docs-theme-toggle {
103-
display: none;
104-
padding: 4px 10px;
105-
margin-top: 10px;
106-
margin-left: 10px;
107-
font-size: 12px;
108-
font-weight: 500;
109-
color: #999;
110-
}
111-
.back-to-top:hover,
112-
.s2-docs-theme-toggle:hover {
113-
color: #428BCA;
114-
text-decoration: none;
115-
}
116-
.s2-docs-theme-toggle {
117-
margin-top: 0;
118-
}
119-
120-
@media (min-width: 768px) {
121-
.back-to-top,
122-
.s2-docs-theme-toggle {
123-
display: block;
124-
}
125-
}
126-
127-
/* Show and affix the side nav when space allows it */
128-
@media (min-width: 992px) {
129-
.s2-docs-sidebar .s2-docs-sidenav {
130-
border-left: 1px solid #eee;
131-
padding-top: 40px;
132-
}
133-
134-
.s2-docs-sidebar .nav > .active > ul {
135-
display: block;
136-
}
137-
/* Widen the fixed sidebar */
138-
.s2-docs-sidebar.affix,
139-
.s2-docs-sidebar.affix-bottom {
140-
width: 213px;
141-
}
142-
.s2-docs-sidebar.affix {
143-
position: fixed; /* Undo the static from mobile first approach */
144-
top: 0px;
145-
}
146-
.s2-docs-sidebar.affix-bottom {
147-
position: absolute; /* Undo the static from mobile first approach */
148-
}
149-
.s2-docs-sidebar.affix-bottom .s2-docs-sidenav,
150-
.s2-docs-sidebar.affix .s2-docs-sidenav {
151-
margin-top: 0;
152-
margin-bottom: 0;
153-
}
154-
}
155-
@media (min-width: 1200px) {
156-
/* Widen the fixed sidebar again */
157-
.s2-docs-sidebar.affix-bottom,
158-
.s2-docs-sidebar.affix {
159-
width: 263px;
160-
}
161-
}
162-
163-
164-
165-
/* Footer */
166-
.s2-docs-footer {
167-
border-top: 1px solid #E5E5E5;
168-
color: #767676;
169-
padding-top: 40px;
170-
padding-bottom: 40px;
171-
margin-top: 100px;
172-
text-align: center;
173-
}
174-
.s2-docs-footer-links {
175-
padding-left: 0;
176-
margin-top: 20px;
177-
}
178-
.s2-docs-footer-links li {
179-
display: inline;
180-
padding: 0 2px;
181-
}
182-
.s2-docs-footer-links li:after {
183-
content: "·";
184-
padding-left: 8px;
185-
}
186-
.s2-docs-footer-links li:first-child {
187-
padding-left: 0;
188-
}
189-
.s2-docs-footer-links li:last-child:after {
190-
content: "";
191-
padding-left: 0;
192-
}
193-
@media (min-width: 768px) {
194-
.s2-docs-footer p {
195-
margin-bottom: 0;
196-
}
197-
}
198-
199-
section {
200-
margin-bottom: 40px;
201-
}
202-
203-
.btn-toolbar {
204-
margin-bottom: 20px;
205-
}
206-
207-
.jumbotron {
208-
background-color: #fff;
209-
border-bottom: 1px solid #eee;
210-
}
211-
212-
.jumbotron h1 {
213-
font-size: 48px;
214-
}
215-
216-
.btn-outline-inverse {
217-
color: #428BCA;
218-
background-color: transparent;
219-
border-color: #428BCA;
220-
padding: 15px 30px;
221-
font-size: 20px;
222-
}
223-
224-
.btn-outline-inverse .fa {
225-
margin-right: 8px;
226-
}
227-
228-
.btn-outline-inverse:hover {
229-
color: #fff;
230-
border-color: #428BCA;
231-
background-color: #428BCA;
232-
}
233-
234-
.version {
235-
color: #999;
236-
}
237-
238-
.navbar {
239-
background-color: #fff;
240-
}
241-
242-
/* anchor.js */
243-
.anchorjs-link {
244-
float: left;
245-
width: 1em;
246-
height: 1em;
247-
margin-left: -1.2em;
248-
opacity: 0;
249-
color: inherit;
250-
text-align: center;
251-
}
252-
.anchorjs-link:link,
253-
.anchorjs-link:visited {
254-
text-decoration: none;
255-
color: inherit;
256-
}
257-
.anchorjs-icon {
258-
font-size: 60%;
259-
vertical-align: .2em;
260-
}
261-
262-
/* Inline code within headings retain the heading's background-color */
263-
h2 code,
264-
h3 code,
265-
h4 code {
266-
background-color: inherit;
267-
}
268-
269-
/* Back to top (hidden on mobile) */
270-
.back-to-top {
271-
display: none;
272-
padding: 4px 10px;
273-
margin-top: 10px;
274-
margin-left: 10px;
275-
font-size: 12px;
276-
font-weight: 500;
277-
color: #999;
278-
}
279-
.back-to-top:hover {
280-
color: #428BCA;
281-
text-decoration: none;
282-
}
283-
284-
@media (min-width: 768px) {
285-
.back-to-top {
286-
display: block;
287-
}
288-
}
289-
290-
.s2-docs-nav {
291-
margin-bottom: 0;
292-
}
293-
294-
.s2-docs-nav .navbar-brand {
295-
font-weight: 500;
296-
}
297-
298-
h1[id] {
299-
padding-top: 20px;
300-
margin-top: 0;
301-
}
302-
303-
.alert {
304-
background-color: transparent;
305-
border-width: 2px;
306-
}
307-
308-
@media (min-width: 768px) {
309-
.alert {
310-
padding: 30px;
311-
}
312-
}
313-
314-
/* Animated hamburger icon @see http://codepen.io/JulienMelissas/pen/LEBGLj */
315-
.navbar-toggle {
316-
border: none;
317-
background: transparent !important;
318-
}
319-
.navbar-toggle:hover {
320-
background: transparent !important;
321-
}
322-
.navbar-toggle .icon-bar {
323-
width: 22px;
324-
transition: all 0.2s;
325-
}
326-
.navbar-toggle .top-bar {
327-
transform: rotate(45deg);
328-
transform-origin: 10% 10%;
329-
}
330-
.navbar-toggle .middle-bar {
331-
opacity: 0;
332-
}
333-
.navbar-toggle .bottom-bar {
334-
transform: rotate(-45deg);
335-
transform-origin: 10% 90%;
336-
}
337-
.navbar-toggle.collapsed .top-bar {
338-
transform: rotate(0);
339-
}
340-
.navbar-toggle.collapsed .middle-bar {
341-
opacity: 1;
342-
}
343-
.navbar-toggle.collapsed .bottom-bar {
344-
transform: rotate(0);
345-
}
346-
347-
</style>
21+
<link href="css/s2-docs.css" rel="stylesheet" >

docs/_sass/_anchorjs.scss

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/* anchor.js */
2+
.anchorjs-link {
3+
float: left;
4+
width: 1em;
5+
height: 1em;
6+
margin-left: -1.2em;
7+
opacity: 0;
8+
color: inherit;
9+
text-align: center;
10+
11+
&:link,
12+
&:visited {
13+
text-decoration: none;
14+
color: inherit;
15+
}
16+
}
17+
18+
.anchorjs-icon {
19+
font-size: 60%;
20+
vertical-align: .2em;
21+
}

docs/_sass/_jumbotron.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.jumbotron {
2+
background-color: #F6F6F6;
3+
border-bottom: 1px solid #eee;
4+
color: #777;
5+
padding-left: 0;
6+
padding-right: 0;
7+
8+
h1 {
9+
font-size: 36px;
10+
color: #777;
11+
}
12+
}

docs/_sass/_s2-docs-alert.sass

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
.alert
2+
padding: 20px
3+
margin: 20px 0
4+
border: 1px solid #eee
5+
border-left-width: 5px
6+
border-radius: 3px
7+
background: #fff
8+
color: #333
9+
10+
h4
11+
margin-top: 0
12+
margin-bottom: 5px
13+
font-size: 18px
14+
15+
&-danger
16+
border-left-color: #CE4844
17+
h4
18+
color: #CE4844
19+
20+
&-info
21+
border-left-color: #1B809E
22+
h4
23+
color: #1B809E
24+
25+
&-warning
26+
border-left-color: #AA6708
27+
h4
28+
color: #AA6708
29+
30+
@media (min-width: 768px)
31+
.alert
32+
padding: 20px

0 commit comments

Comments
 (0)