summaryrefslogtreecommitdiff
path: root/scss/values/typography
diff options
context:
space:
mode:
authorJoe Carstairs <118172583+jcarstairs-scottlogic@users.noreply.github.com>2024-01-19 09:33:11 +0000
committerGitHub <noreply@github.com>2024-01-19 09:33:11 +0000
commit7140956da0820d4b818119eff7dfc72345f3328e (patch)
tree503e1129a999fe834d2a7b98a4e82bf07264f49f /scss/values/typography
parenta4f3cb02befe658594c076144be2e5200f36682a (diff)
parent83c3460191a2089b56b091a7f4e09f39ac636e1e (diff)
Merge pull request #65 from joeacarstairs/deployment-staging
Update production
Diffstat (limited to 'scss/values/typography')
-rw-r--r--scss/values/typography/_constants.scss20
-rw-r--r--scss/values/typography/_index.scss18
2 files changed, 38 insertions, 0 deletions
diff --git a/scss/values/typography/_constants.scss b/scss/values/typography/_constants.scss
new file mode 100644
index 0000000..4ea0117
--- /dev/null
+++ b/scss/values/typography/_constants.scss
@@ -0,0 +1,20 @@
+$base-font-size: (
+ 'xxl': 1.5rem,
+ 'xl': 1.2rem,
+ 'lg': 1.1rem,
+ 'md': 1rem,
+ 'sm': 0.9rem,
+ 'xs': 0.8rem,
+ 'initial': 0.7rem,
+);
+
+$font-size-factor: (
+ '0': 1,
+ '1': 1.25,
+ '2': 1.5,
+ '3': 2,
+ '4': 2.5,
+ '5': 3,
+ '6': 3.5
+);
+
diff --git a/scss/values/typography/_index.scss b/scss/values/typography/_index.scss
new file mode 100644
index 0000000..3aa4384
--- /dev/null
+++ b/scss/values/typography/_index.scss
@@ -0,0 +1,18 @@
+@use 'sass:map';
+
+@use 'constants';
+
+@function font-size($font-size-grade, $breakpoint: initial) {
+ @return calc(
+ map.get(constants.$base-font-size, $breakpoint)
+ * map.get(constants.$font-size-factor, $font-size-grade)
+ );
+}
+
+@function border-width($breakpoint: initial) {
+ @return calc(
+ map.get(constants.$base-font-size, $breakpoint)
+ / 8
+ );
+}
+