Skip to content

Commit 10cea5d

Browse files
committed
modify tutorial scss
now headers are more visible and lines don't go full screen width
1 parent e8c829c commit 10cea5d

File tree

1 file changed

+139
-10
lines changed

1 file changed

+139
-10
lines changed

tutorial.scss

Lines changed: 139 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,152 @@
11
/* TODO:
2-
* + for each wrapped section display line on right side (to show nesting)
3-
* + add margins and more dynamic font maybe or highlighting
2+
* + for each wrapped section display line on left side (to show nesting)
3+
* + add margins (70 characters on line)
4+
* and more dynamic font maybe or highlighting
45
* + list numbering in different color
6+
* + increase header font size
57
* */
68

79
@import "colors.scss";
8-
@import "default.scss";
910
@import "html_default.scss";
1011

11-
$line-height: 1.8em;
12+
$line-height: 35px;
1213

13-
$font-size: 1.4em;
14+
$font-size: 15px;
1415
// }}}
1516

17+
// variable setup {{{
18+
// check "INFO" tags in file when applying to colorcheme
19+
// It's filter adjasment most of time (like hue rotate)
20+
// check "FUNNY" tags for things I can't understand (you might let me know how
21+
// why it's done so)
22+
23+
$main-background-color: $color0;
24+
$background-dark: darken($main-background-color, 5%);
25+
/* used to separate sections from each other (like borders) */
26+
$background-light: lighten($main-background-color, 18%);
27+
28+
$light: $color15;
29+
$grey: lighten($color8, 00%);
30+
31+
// in this file will be use as MAIN COLOR
32+
$link-color: $color2;
33+
34+
$stress1: $color1; /* current opened tab in repository */
35+
$stress2: $color9; /* hi last commiter name */
36+
$stress3: $color12;
37+
$stress4: $color2;
38+
$stress5: $color10;
39+
$stress_sec1: darken($stress1, 35%);
40+
$stress_sec2: darken($stress2, 35%);
41+
$stress_sec3: darken($stress3, 35%);
42+
$stress_sec4: darken($stress4, 35%);
43+
$stress_sec5: darken($stress5, 35%);
44+
45+
/* color when you need to emphasize some section (neighter it's button
46+
* or heading to something */
47+
// $section-emph-border: lighten($color1, 5%);
48+
$section-emph-border: lighten($color11, 0%);
49+
$section-emph-background: darken($color11, 55%);
50+
51+
$button-emph-background: darken($stress3, 35%);
52+
$button-emph-border: $stress3;
53+
54+
$sel-background: darken($color8, 25%);
55+
56+
$button-border-hover: #8d969e;
57+
58+
$debug: #7a5178;
59+
// }}}
60+
// default stylesheet {{{
61+
body
62+
{
63+
background: $main-background-color;
64+
color: $light;
65+
// usually header
66+
h1,h2,h3,h4,h5,h6
67+
{
68+
color: $light ;
69+
}
70+
// usually code
71+
code,
72+
pre
73+
{
74+
background: $background-dark ;
75+
border-color: $background-light ;
76+
color: $light ;
77+
}
78+
// emphasized text
79+
strong, em
80+
{
81+
color: lighten($light, 5%) ;
82+
}
83+
}
84+
// usually bottom of page
85+
footer
86+
{
87+
p
88+
{
89+
color: $grey ;
90+
}
91+
}
92+
a
93+
{
94+
border-color: $background-light ;
95+
text-decoration: none ;
96+
&:link
97+
{
98+
color: $stress2 ;
99+
}
100+
&:hover,
101+
&:active
102+
{
103+
border-color: $button-border-hover ;
104+
color: lighten($stress2,10%) ;
105+
}
106+
&:visited
107+
{
108+
color: $link-color ;
109+
}
110+
}
111+
// }}}
112+
113+
// combine vw measuring unit with min-width meta variable
114+
body {
115+
margin-left: 3em;
116+
// only inside of actual content (without table of contents)
117+
& > div {
118+
// increase space between lists
119+
li {
120+
margin-top: 10px;
121+
margin-bottom: 10px;
122+
}
123+
// show unfolded sections with different color
124+
input[type=checkbox]:checked + label {
125+
h1, h2, h3, h4 {
126+
color: $stress1;
127+
}
128+
}
129+
// show folded sections with pure white color
130+
input[type=checkbox] + label {
131+
h1, h2, h3, h4 {
132+
color: #fff;
133+
}
134+
}
135+
}
136+
137+
}
138+
// if screen is too big content will be limited in width
139+
@media (min-width: 800px) {
140+
body {
141+
width: 800px;
142+
}
143+
}
144+
// increaese font size for better readability
145+
p, li
146+
{
147+
font-size: $font-size;
148+
}
149+
16150
// table of contents {{{
17151
ol {
18152
counter-reset: item;
@@ -62,8 +196,3 @@ input[type='checkbox'] {
62196
}
63197
// }}}
64198

65-
p, li
66-
{
67-
font-size: $font-size;
68-
}
69-

0 commit comments

Comments
 (0)