Skip to content

Commit 50f92d2

Browse files
authored
Merge pull request #1907 from To1ne/toon-responsive-graphs
small-and-fast: make bar-graph table responsive
2 parents b1efd15 + 77d0c63 commit 50f92d2

File tree

4 files changed

+246
-229
lines changed

4 files changed

+246
-229
lines changed

assets/sass/about.scss

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
.bar-chart-grid {
2+
display: grid;
3+
grid-template-columns: repeat(6, 1fr);
4+
}
5+
6+
@media (max-width: 760px) {
7+
.bar-chart-grid {
8+
grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
9+
}
10+
}
11+
12+
.bar-chart {
13+
display: inline-grid;
14+
15+
/* Got the idea of using <dl>, <dt>, and <dd> from:
16+
* https://css-tricks.com/making-charts-with-css/ */
17+
dt {
18+
grid-column: 1 / 4;
19+
text-align: center;
20+
}
21+
22+
dd {
23+
padding: 5px;
24+
margin: 0;
25+
text-align: center;
26+
display: flex;
27+
flex-direction: column;
28+
}
29+
30+
dd + dd {
31+
border-left: 1px solid #ccc;
32+
}
33+
34+
progress {
35+
/* Reset the default appearance */
36+
-webkit-appearance: none;
37+
-moz-appearance: none;
38+
appearance: none;
39+
40+
writing-mode: vertical-lr;
41+
42+
width: 2em;
43+
height: 5em;
44+
background: none;
45+
border: none;
46+
position: relative;
47+
}
48+
49+
progress::-webkit-progress-bar {
50+
background: none;
51+
}
52+
53+
progress::-webkit-progress-value {
54+
/* Chrome (and derivatives) are stubborn to attach the bar to the top */
55+
bottom: 0;
56+
position: absolute;
57+
}
58+
59+
progress.git::-moz-progress-bar {
60+
background-color: #E09FA0;
61+
}
62+
progress.git::-webkit-progress-value {
63+
background-color: #E09FA0;
64+
}
65+
progress.svn::-moz-progress-bar {
66+
background-color: #E05F49;
67+
}
68+
progress.svn::-webkit-progress-value {
69+
background-color: #E05F49;
70+
}
71+
}

assets/sass/application.scss

Lines changed: 1 addition & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ $baseurl: "{{ .Site.BaseURL }}{{ if (and (ne .Site.BaseURL "/") (ne .Site.BaseUR
2626
@import 'book';
2727
@import 'book2';
2828
@import 'lists';
29+
@import 'about';
2930

3031
code {
3132
display: inline;
@@ -49,64 +50,3 @@ pre {
4950
.d-flex{
5051
display: flex;
5152
}
52-
53-
.bar-chart {
54-
display: inline-grid;
55-
56-
/* Got the idea of using <dl>, <dt>, and <dd> from:
57-
* https://css-tricks.com/making-charts-with-css/ */
58-
dt {
59-
grid-column: 1 / 4;
60-
text-align: center;
61-
}
62-
63-
dd {
64-
padding: 5px;
65-
margin: 0;
66-
text-align: center;
67-
display: flex;
68-
flex-direction: column;
69-
}
70-
71-
dd + dd {
72-
border-left: 1px solid #ccc;
73-
}
74-
75-
progress {
76-
/* Reset the default appearance */
77-
-webkit-appearance: none;
78-
-moz-appearance: none;
79-
appearance: none;
80-
81-
writing-mode: vertical-lr;
82-
83-
width: 2em;
84-
height: 5em;
85-
background: none;
86-
border: none;
87-
position: relative;
88-
}
89-
90-
progress::-webkit-progress-bar {
91-
background: none;
92-
}
93-
94-
progress::-webkit-progress-value {
95-
/* Chrome (and derivatives) are stubborn to attach the bar to the top */
96-
bottom: 0;
97-
position: absolute;
98-
}
99-
100-
progress.git::-moz-progress-bar {
101-
background-color: #E09FA0;
102-
}
103-
progress.git::-webkit-progress-value {
104-
background-color: #E09FA0;
105-
}
106-
progress.svn::-moz-progress-bar {
107-
background-color: #E05F49;
108-
}
109-
progress.svn::-webkit-progress-value {
110-
background-color: #E05F49;
111-
}
112-
}

0 commit comments

Comments
 (0)