Skip to content

Commit 490fa12

Browse files
Update (#46)
1 parent 1377456 commit 490fa12

File tree

9 files changed

+32
-133
lines changed

9 files changed

+32
-133
lines changed

.stylelintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
scss/mixin/_layout.scss
2-
scss/plugin/_normalize.scss
2+
scss/plugin/_reset.scss

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@blockchainhub/coco",
3-
"version": "2.2.0",
3+
"version": "2.2.1",
44
"description": "Modern CSS framework based on Flexbox.",
55
"keywords": [
66
"css",
@@ -9,6 +9,7 @@
99
"front-end",
1010
"responsive",
1111
"sass",
12+
"scss",
1213
"sass-framework",
1314
"web"
1415
],
@@ -62,5 +63,6 @@
6263
"dist",
6364
"LICENSE",
6465
"README.md"
65-
]
66+
],
67+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
6668
}

scss/config/_generator.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ $generators: map.deep-merge(
1010
'divider': true,
1111
'layout': true,
1212
'media': true,
13-
'normalize': true,
13+
'reset': true,
1414
'print': true,
1515
'root': true,
1616
'table': true,

scss/config/_info.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
$v: '2.0.0';
2-
31
.coco.version::after {
42
content: '#{$v}';
53
}

scss/element/_grid.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ $container-widths: config('container-widths', $grid, false);
2828
// Column Mixin for Flexbox Grid
2929
@mixin col($columns) {
3030
box-sizing: border-box;
31-
flex: 0 0 math.percentage($columns / $grid-columns);
32-
max-width: math.percentage($columns / $grid-columns);
31+
flex: 0 0 math.percentage(math.div($columns, $grid-columns));
32+
max-width: math.percentage(math.div($columns, $grid-columns));
3333
padding: $gutter;
3434
text-align: center;
3535
}

scss/form/_group.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@use 'sass:list';
12
@use '../function' as *;
23
@use '../mixin' as *;
34
@use '../config' as *;
@@ -89,7 +90,7 @@
8990
}
9091

9192
&-container {
92-
container: form-group-container / inline-size;
93+
container: list.slash(form-group-container, inline-size);
9394
}
9495
}
9596
}

scss/mixin/_generator.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
/// Generate all the styles.
1010
@mixin generate-styles {
11-
@if map.get($generators, 'content', 'normalize') {
12-
@include generate-normalize;
11+
@if map.get($generators, 'content', 'reset') {
12+
@include generate-reset;
1313
}
1414

1515
@if map.get($generators, 'content', 'root') {

scss/plugin/_index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
@forward 'normalize';
1+
@forward 'reset';
Lines changed: 19 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,40 @@
1-
@mixin generate-normalize {
1+
@mixin generate-reset {
22

3-
/* Document
4-
========================================================================== */
5-
6-
/**
7-
* 1. Correct the line height in all browsers.
8-
* 2. Prevent adjustments of font size after orientation changes in iOS.
9-
*/
10-
11-
html {
12-
line-height: 1.15; /* 1 */
13-
-webkit-text-size-adjust: 100%; /* 2 */
3+
* {
4+
box-sizing: border-box;
5+
position: relative;
6+
min-width: 0;
147
}
158

16-
/* Sections
17-
========================================================================== */
18-
19-
/**
20-
* Remove the margin in all browsers.
21-
*/
22-
239
body {
10+
min-height: 100dvh;
2411
margin: 0;
2512
}
2613

27-
/**
28-
* Render the `main` element consistently in IE.
29-
*/
30-
31-
main {
32-
display: block;
14+
h1, h2, h3, h4, h5, h6 {
15+
text-wrap: balance;
3316
}
3417

35-
/**
36-
* Correct the font size and margin on `h1` elements within `section` and
37-
* `article` contexts in Chrome, Firefox, and Safari.
38-
*/
39-
40-
h1 {
41-
font-size: 2em;
42-
margin: 0.67em 0;
18+
p {
19+
text-wrap: pretty;
4320
}
4421

45-
/* Grouping content
22+
/* Document
4623
========================================================================== */
4724

4825
/**
49-
* 1. Add the correct box sizing in Firefox.
50-
* 2. Show the overflow in Edge and IE.
26+
* 1. Correct the line height in all browsers.
27+
* 2. Prevent adjustments of font size after orientation changes in iOS.
5128
*/
5229

53-
hr {
54-
box-sizing: content-box; /* 1 */
55-
block-size: 0; /* 1 */
56-
overflow: visible; /* 2 */
30+
html {
31+
line-height: 1.15; /* 1 */
32+
-webkit-text-size-adjust: 100%; /* 2 */
5733
}
5834

35+
/* Sections
36+
========================================================================== */
37+
5938
/**
6039
* 1. Correct the inheritance and scaling of font size in all browsers.
6140
* 2. Correct the odd `em` font sizing in all browsers.
@@ -66,17 +45,6 @@
6645
font-size: 1em; /* 2 */
6746
}
6847

69-
/* Text-level semantics
70-
========================================================================== */
71-
72-
/**
73-
* Remove the gray background on active links in IE 10.
74-
*/
75-
76-
a {
77-
background-color: transparent;
78-
}
79-
8048
/**
8149
* 1. Remove the bottom border in Chrome 57-
8250
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
@@ -117,38 +85,6 @@
11785
font-size: 80%;
11886
}
11987

120-
/**
121-
* Prevent `sub` and `sup` elements from affecting the line height in
122-
* all browsers.
123-
*/
124-
125-
sub,
126-
sup {
127-
font-size: 75%;
128-
line-height: 0;
129-
position: relative;
130-
vertical-align: baseline;
131-
}
132-
133-
sub {
134-
bottom: -0.25em;
135-
}
136-
137-
sup {
138-
top: -0.5em;
139-
}
140-
141-
/* Embedded content
142-
========================================================================== */
143-
144-
/**
145-
* Remove the border on images inside links in IE 10.
146-
*/
147-
148-
img {
149-
border-style: none;
150-
}
151-
15288
/* Forms
15389
========================================================================== */
15490

@@ -243,25 +179,6 @@
243179
vertical-align: baseline;
244180
}
245181

246-
/**
247-
* Remove the default vertical scrollbar in IE 10+.
248-
*/
249-
250-
textarea {
251-
overflow: auto;
252-
}
253-
254-
/**
255-
* 1. Add the correct box sizing in IE 10.
256-
* 2. Remove the padding in IE 10.
257-
*/
258-
259-
[type="checkbox"],
260-
[type="radio"] {
261-
box-sizing: border-box; /* 1 */
262-
padding: 0; /* 2 */
263-
}
264-
265182
/**
266183
* Correct the cursor style of increment and decrement buttons in Chrome.
267184
*/
@@ -290,23 +207,4 @@
290207
display: list-item;
291208
cursor: pointer;
292209
}
293-
294-
/* Misc
295-
========================================================================== */
296-
297-
/**
298-
* Add the correct display in IE 10+.
299-
*/
300-
301-
template {
302-
display: none;
303-
}
304-
305-
/**
306-
* Add the correct display in IE 10.
307-
*/
308-
309-
[hidden] {
310-
display: none;
311-
}
312210
}

0 commit comments

Comments
 (0)