1
- /*** The new CSS Reset - version 1.2.0 (last updated 23.7.2021) ***/
1
+ /***
2
+ The new CSS reset - version 1.7.3 (last updated 7.8.2022)
3
+ GitHub page: https://github.com/elad2412/the-new-css-reset
4
+ ***/
2
5
3
- /* Remove all the styles of the "User-Agent-Stylesheet", except for the 'display' property */
4
- * : where (: not (iframe , canvas , img , svg , video ): not (svg * )) {
6
+ /*
7
+ Remove all the styles of the "User-Agent-Stylesheet", except for the 'display' property
8
+ - The "symbol *" part is to solve Firefox SVG sprite bug
9
+ */
10
+ * : where (: not (html , iframe , canvas , img , svg , video , audio ): not (svg * , symbol * )) {
5
11
all : unset;
6
12
display : revert;
7
13
}
8
14
9
- /* stylelint-disable */
10
15
/* Preferred box-sizing value */
11
16
* ,
12
17
* ::before ,
13
18
* ::after {
14
19
box-sizing : border-box;
15
20
}
16
- /* stylelint-enable */
17
21
18
- /*
19
- Remove list styles (bullets/numbers)
20
- in case you use it with normalize.css
21
- */
22
- ol ,
23
- ul {
22
+ /* Reapply the pointer cursor for anchor tags */
23
+ a , button {
24
+ cursor : revert;
25
+ }
26
+
27
+ /* Remove list styles (bullets/numbers) */
28
+ ol , ul , menu {
24
29
list-style : none;
25
30
}
26
31
@@ -29,12 +34,50 @@ img {
29
34
max-width : 100% ;
30
35
}
31
36
32
- /* Removes spacing between cells in tables */
37
+ /* removes spacing between cells in tables */
33
38
table {
34
39
border-collapse : collapse;
35
40
}
36
41
37
- /* Revert the 'white-space' property for textarea elements on Safari */
42
+ /* Safari - solving issue when using user-select:none on the <body> text input doesn't working */
43
+ input , textarea {
44
+ -webkit-user-select : auto;
45
+ }
46
+
47
+ /* revert the 'white-space' property for textarea elements on Safari */
38
48
textarea {
39
49
white-space : revert;
40
50
}
51
+
52
+ /* minimum style to allow to style meter element */
53
+ meter {
54
+ -webkit-appearance : revert;
55
+ appearance : revert;
56
+ }
57
+
58
+ /* reset default text opacity of input placeholder */
59
+ ::placeholder {
60
+ color : unset;
61
+ }
62
+
63
+ /* fix the feature of 'hidden' attribute.
64
+ display:revert; revert to element instead of attribute */
65
+ : where ([hidden ]) {
66
+ display : none;
67
+ }
68
+
69
+ /* revert for bug in Chromium browsers
70
+ - fix for the content editable attribute will work properly.
71
+ - webkit-user-select: auto; added for Safari in case of using user-select:none on wrapper element*/
72
+ : where ([contenteditable ]: not ([contenteditable = "false" ])) {
73
+ -moz-user-modify : read-write;
74
+ -webkit-user-modify : read-write;
75
+ overflow-wrap : break-word;
76
+ -webkit-line-break : after-white-space;
77
+ -webkit-user-select : auto;
78
+ }
79
+
80
+ /* apply back the draggable feature - exist only in Chromium and Safari */
81
+ : where ([draggable = "true" ]) {
82
+ -webkit-user-drag : element;
83
+ }
0 commit comments