Skip to content

Commit a751777

Browse files
New CSS features (#130)
* Upgrading dependencies * Dependency changes * Allowing to pass browser support from the settings * New features * Typo * Update cssdb.settings.json Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com> * Update cssdb.settings.json Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com> Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>
1 parent 37cc4da commit a751777

File tree

6 files changed

+288
-128
lines changed

6 files changed

+288
-128
lines changed

cssdb.json

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,11 @@
129129
"firefox": "97",
130130
"chrome": "99",
131131
"safari": "15.4",
132+
"opera": "86",
132133
"ios_saf": "15.4",
133134
"android": "99",
134-
"and_chr": "99"
135+
"and_chr": "99",
136+
"and_ff": "97"
135137
},
136138
"docs": {
137139
"mdn": "https://developer.mozilla.org/en-US/docs/Web/CSS/@layer"
@@ -519,6 +521,22 @@
519521
],
520522
"vendors_implementations": 3
521523
},
524+
{
525+
"id": "exponential-functions",
526+
"title": "`pow()`, `sqrt()`, `hypot()`, `log()`, `exp()` exponential functions",
527+
"description": "Compute various exponential functions with their arguments",
528+
"specification": "https://www.w3.org/TR/css-values-4/#exponent-funcs",
529+
"stage": 2,
530+
"browser_support": {},
531+
"example": "p {\n font-size: calc(pow(10, 12) * 1rem);\n font-size: calc(sqrt(100) * 1rem);\n font-size: calc(hypot(3, 4) * 1rem);\n font-size: calc(log(10) * 1rem);\n font-size: calc(exp(10) * 1rem);\n}",
532+
"polyfills": [
533+
{
534+
"type": "PostCSS Plugin",
535+
"link": "https://github.com/JLHwung/postcss-font-family-fangsong"
536+
}
537+
],
538+
"vendors_implementations": 0
539+
},
522540
{
523541
"id": "fangsong-font-family",
524542
"title": "`fangsong` Font Family",
@@ -824,7 +842,7 @@
824842
"link": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-hwb-function"
825843
}
826844
],
827-
"vendors_implementations": 2
845+
"vendors_implementations": 3
828846
},
829847
{
830848
"id": "ic-unit",
@@ -1386,6 +1404,16 @@
13861404
],
13871405
"vendors_implementations": 3
13881406
},
1407+
{
1408+
"id": "stepped-value-functions",
1409+
"title": "`round()`, `mod()` and `rem()` functions",
1410+
"description": "The stepped-value functions, `round()`, `mod()`, and `rem()`, all transform a given value according to another \"step value\", in different ways.",
1411+
"specification": "https://www.w3.org/TR/css-values-4/#round-func",
1412+
"stage": 2,
1413+
"browser_support": {},
1414+
"example": "div {\n left: mod(18px, 5px);\n top: rem(18px, 5px);\n right: round(2.5px, 1px);\n bottom: round(up, 15px, 7px);\n}",
1415+
"vendors_implementations": 0
1416+
},
13891417
{
13901418
"id": "system-ui-font-family",
13911419
"title": "`system-ui` Font Family",
@@ -1419,6 +1447,19 @@
14191447
],
14201448
"vendors_implementations": 3
14211449
},
1450+
{
1451+
"id": "trigonometric-functions",
1452+
"title": "`sin()`, `cos()`, `tan()`, `asin()`, `acos()`, `atan()` and `atan2()` functions",
1453+
"description": "Functions to calculate varios basic trigonometric relationships",
1454+
"specification": "https://www.w3.org/TR/css-values-4/#trig-funcs",
1455+
"stage": 2,
1456+
"browser_support": {
1457+
"safari": "15.4",
1458+
"ios_saf": "15.4"
1459+
},
1460+
"example": "body {\n left: sin(45deg);\n left: cos(45deg);\n left: tan(45deg);\n left: asin(0.5);\n left: acos(0.5);\n left: atan(10);\n left: atan2(-1, 1);\n}",
1461+
"vendors_implementations": 1
1462+
},
14221463
{
14231464
"id": "unset-value",
14241465
"title": "`unset` Keyword",

cssdb.mjs

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,11 @@ export default [
129129
"firefox": "97",
130130
"chrome": "99",
131131
"safari": "15.4",
132+
"opera": "86",
132133
"ios_saf": "15.4",
133134
"android": "99",
134-
"and_chr": "99"
135+
"and_chr": "99",
136+
"and_ff": "97"
135137
},
136138
"docs": {
137139
"mdn": "https://developer.mozilla.org/en-US/docs/Web/CSS/@layer"
@@ -519,6 +521,22 @@ export default [
519521
],
520522
"vendors_implementations": 3
521523
},
524+
{
525+
"id": "exponential-functions",
526+
"title": "`pow()`, `sqrt()`, `hypot()`, `log()`, `exp()` exponential functions",
527+
"description": "Compute various exponential functions with their arguments",
528+
"specification": "https://www.w3.org/TR/css-values-4/#exponent-funcs",
529+
"stage": 2,
530+
"browser_support": {},
531+
"example": "p {\n font-size: calc(pow(10, 12) * 1rem);\n font-size: calc(sqrt(100) * 1rem);\n font-size: calc(hypot(3, 4) * 1rem);\n font-size: calc(log(10) * 1rem);\n font-size: calc(exp(10) * 1rem);\n}",
532+
"polyfills": [
533+
{
534+
"type": "PostCSS Plugin",
535+
"link": "https://github.com/JLHwung/postcss-font-family-fangsong"
536+
}
537+
],
538+
"vendors_implementations": 0
539+
},
522540
{
523541
"id": "fangsong-font-family",
524542
"title": "`fangsong` Font Family",
@@ -824,7 +842,7 @@ export default [
824842
"link": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-hwb-function"
825843
}
826844
],
827-
"vendors_implementations": 2
845+
"vendors_implementations": 3
828846
},
829847
{
830848
"id": "ic-unit",
@@ -1386,6 +1404,16 @@ export default [
13861404
],
13871405
"vendors_implementations": 3
13881406
},
1407+
{
1408+
"id": "stepped-value-functions",
1409+
"title": "`round()`, `mod()` and `rem()` functions",
1410+
"description": "The stepped-value functions, `round()`, `mod()`, and `rem()`, all transform a given value according to another \"step value\", in different ways.",
1411+
"specification": "https://www.w3.org/TR/css-values-4/#round-func",
1412+
"stage": 2,
1413+
"browser_support": {},
1414+
"example": "div {\n left: mod(18px, 5px);\n top: rem(18px, 5px);\n right: round(2.5px, 1px);\n bottom: round(up, 15px, 7px);\n}",
1415+
"vendors_implementations": 0
1416+
},
13891417
{
13901418
"id": "system-ui-font-family",
13911419
"title": "`system-ui` Font Family",
@@ -1419,6 +1447,19 @@ export default [
14191447
],
14201448
"vendors_implementations": 3
14211449
},
1450+
{
1451+
"id": "trigonometric-functions",
1452+
"title": "`sin()`, `cos()`, `tan()`, `asin()`, `acos()`, `atan()` and `atan2()` functions",
1453+
"description": "Functions to calculate varios basic trigonometric relationships",
1454+
"specification": "https://www.w3.org/TR/css-values-4/#trig-funcs",
1455+
"stage": 2,
1456+
"browser_support": {
1457+
"safari": "15.4",
1458+
"ios_saf": "15.4"
1459+
},
1460+
"example": "body {\n left: sin(45deg);\n left: cos(45deg);\n left: tan(45deg);\n left: asin(0.5);\n left: acos(0.5);\n left: atan(10);\n left: atan2(-1, 1);\n}",
1461+
"vendors_implementations": 1
1462+
},
14221463
{
14231464
"id": "unset-value",
14241465
"title": "`unset` Keyword",

cssdb.settings.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,15 @@
390390
}
391391
]
392392
},
393+
{
394+
"id": "exponential-functions",
395+
"title": "`pow()`, `sqrt()`, `hypot()`, `log()`, `exp()` exponential functions",
396+
"description": "Compute various exponential functions with their arguments",
397+
"specification": "https://www.w3.org/TR/css-values-4/#exponent-funcs",
398+
"stage": 2,
399+
"browser_support": {},
400+
"example": "p {\n font-size: calc(pow(10, 12) * 1rem);\n font-size: calc(sqrt(100) * 1rem);\n font-size: calc(hypot(3, 4) * 1rem);\n font-size: calc(log(10) * 1rem);\n font-size: calc(exp(10) * 1rem);\n}"
401+
},
393402
{
394403
"id": "fangsong-font-family",
395404
"title": "`fangsong` Font Family",
@@ -809,6 +818,15 @@
809818
}
810819
]
811820
},
821+
{
822+
"id": "calc-constants",
823+
"title": "`e`, `pi`, `infinity`, `-infinity` and `NaN` constants for calculation",
824+
"description": "Constants for calculation simplification",
825+
"specification": "https://www.w3.org/TR/css-values-4/#calc-constants",
826+
"stage": 2,
827+
"browser_support": {},
828+
"example": "p {\n font-size: calc(pow(e, pi) * 1rem);\n}"
829+
},
812830
{
813831
"id": "oklab-function",
814832
"title": "`oklab` and `oklch` color functions",
@@ -985,6 +1003,24 @@
9851003
}
9861004
]
9871005
},
1006+
{
1007+
"id": "sign-functions",
1008+
"title": "`abs()` and `sign()` functions",
1009+
"description": "The sign-related functions—abs() and sign()—compute various functions related to the sign of their argument",
1010+
"specification": "https://www.w3.org/TR/css-values-4/#sign-funcs",
1011+
"stage": 2,
1012+
"browser_support": {},
1013+
"example": "div {\n order: abs(-10);\n order: sign(-10);\n}"
1014+
},
1015+
{
1016+
"id": "stepped-value-functions",
1017+
"title": "`round()`, `mod()` and `rem()` functions",
1018+
"description": "The stepped-value functions, `round()`, `mod()`, and `rem()`, all transform a given value according to another \"step value\", in different ways",
1019+
"specification": "https://www.w3.org/TR/css-values-4/#round-func",
1020+
"stage": 2,
1021+
"browser_support": {},
1022+
"example": "div {\n left: mod(18px, 5px);\n top: rem(18px, 5px);\n right: round(2.5px, 1px);\n bottom: round(up, 15px, 7px);\n}"
1023+
},
9881024
{
9891025
"id": "system-ui-font-family",
9901026
"title": "`system-ui` Font Family",
@@ -1004,6 +1040,18 @@
10041040
}
10051041
]
10061042
},
1043+
{
1044+
"id": "trigonometric-functions",
1045+
"title": "`sin()`, `cos()`, `tan()`, `asin()`, `acos()`, `atan()` and `atan2()` functions",
1046+
"description": "Functions to calculate varios basic trigonometric relationships",
1047+
"specification": "https://www.w3.org/TR/css-values-4/#trig-funcs",
1048+
"stage": 2,
1049+
"browser_support": {
1050+
"safari": "15.4",
1051+
"ios_saf": "15.4"
1052+
},
1053+
"example": "body {\n left: sin(45deg);\n left: cos(45deg);\n left: tan(45deg);\n left: asin(0.5);\n left: acos(0.5);\n left: atan(10);\n left: atan2(-1, 1);\n}"
1054+
},
10071055
{
10081056
"id": "unset-value",
10091057
"title": "`unset` Keyword",

0 commit comments

Comments
 (0)