From dbcb92b28e3c71ba6b9caffb86fcdf6f91073ec8 Mon Sep 17 00:00:00 2001 From: Jon McClure Date: Sat, 8 Jul 2023 16:33:03 +0100 Subject: [PATCH] text rules --- src/scss/main.scss | 1 + src/scss/text/_font-style.scss | 12 +++++++ src/scss/text/_font-weight.scss | 54 +++++++++++++++++++++++++++++ src/scss/text/_rules.scss | 7 ++++ src/scss/text/_text-align.scss | 36 +++++++++++++++++++ src/scss/text/_text-decoration.scss | 24 +++++++++++++ src/scss/text/_text-transform.scss | 12 +++++++ src/scss/text/_white-space.scss | 12 +++++++ src/scss/text/_word-break.scss | 14 ++++++++ 9 files changed, 172 insertions(+) create mode 100644 src/scss/text/_font-style.scss create mode 100644 src/scss/text/_font-weight.scss create mode 100644 src/scss/text/_rules.scss create mode 100644 src/scss/text/_text-align.scss create mode 100644 src/scss/text/_text-decoration.scss create mode 100644 src/scss/text/_text-transform.scss create mode 100644 src/scss/text/_white-space.scss create mode 100644 src/scss/text/_word-break.scss diff --git a/src/scss/main.scss b/src/scss/main.scss index cb087396..31b62fc0 100644 --- a/src/scss/main.scss +++ b/src/scss/main.scss @@ -20,3 +20,4 @@ // Style rules @import 'spacers/rules'; @import 'typography/rules'; +@import 'text/rules'; diff --git a/src/scss/text/_font-style.scss b/src/scss/text/_font-style.scss new file mode 100644 index 00000000..4023cf52 --- /dev/null +++ b/src/scss/text/_font-style.scss @@ -0,0 +1,12 @@ +.italic { + font-style: italic; +} +.not-italic { + font-style: normal; +} +.\!italic { + font-style: italic !important; +} +.\!not-italic { + font-style: normal !important; +} diff --git a/src/scss/text/_font-weight.scss b/src/scss/text/_font-weight.scss new file mode 100644 index 00000000..4b34892f --- /dev/null +++ b/src/scss/text/_font-weight.scss @@ -0,0 +1,54 @@ +.font-thin { + font-weight: 100; +} +.font-extralight { + font-weight: 200; +} +.font-light { + font-weight: 300; +} +.font-normal { + font-weight: 400; +} +.font-medium { + font-weight: 500; +} +.font-semibold { + font-weight: 600; +} +.font-bold { + font-weight: 700; +} +.font-extrabold { + font-weight: 800; +} +.font-black { + font-weight: 900; +} +.\!font-thin { + font-weight: 100 !important; +} +.\!font-extralight { + font-weight: 200 !important; +} +.\!font-light { + font-weight: 300 !important; +} +.\!font-normal { + font-weight: 400 !important; +} +.\!font-medium { + font-weight: 500 !important; +} +.\!font-semibold { + font-weight: 600 !important; +} +.\!font-bold { + font-weight: 700 !important; +} +.\!font-extrabold { + font-weight: 800 !important; +} +.\!font-black { + font-weight: 900 !important; +} diff --git a/src/scss/text/_rules.scss b/src/scss/text/_rules.scss new file mode 100644 index 00000000..c07023c0 --- /dev/null +++ b/src/scss/text/_rules.scss @@ -0,0 +1,7 @@ +@import 'font-style'; +@import 'font-weight'; +@import 'text-align'; +@import 'text-decoration'; +@import 'text-transform'; +@import 'white-space'; +@import 'word-break'; diff --git a/src/scss/text/_text-align.scss b/src/scss/text/_text-align.scss new file mode 100644 index 00000000..fd0d92a6 --- /dev/null +++ b/src/scss/text/_text-align.scss @@ -0,0 +1,36 @@ +.text-left { + text-align: left; +} +.text-center { + text-align: center; +} +.text-right { + text-align: right; +} +.text-justify { + text-align: justify; +} +.text-start { + text-align: start; +} +.text-end { + text-align: end !important; +} +.\!text-left { + text-align: left !important; +} +.\!text-center { + text-align: center !important; +} +.\!text-right { + text-align: right !important; +} +.\!text-justify { + text-align: justify !important; +} +.\!text-start { + text-align: start !important; +} +.\!text-end { + text-align: end !important; +} diff --git a/src/scss/text/_text-decoration.scss b/src/scss/text/_text-decoration.scss new file mode 100644 index 00000000..8d5ea5f4 --- /dev/null +++ b/src/scss/text/_text-decoration.scss @@ -0,0 +1,24 @@ +.underline { + text-decoration-line: underline; +} +.overline { + text-decoration-line: overline; +} +.line-through { + text-decoration-line: line-through; +} +.no-underline { + text-decoration-line: none; +} +.\!underline { + text-decoration-line: underline !important; +} +.\!overline { + text-decoration-line: overline !important; +} +.\!line-through { + text-decoration-line: line-through !important; +} +.\!no-underline { + text-decoration-line: none !important; +} diff --git a/src/scss/text/_text-transform.scss b/src/scss/text/_text-transform.scss new file mode 100644 index 00000000..d16628eb --- /dev/null +++ b/src/scss/text/_text-transform.scss @@ -0,0 +1,12 @@ +.uppercase { + text-transform: uppercase; +} +.lowercase { + text-transform: lowercase; +} +.\!uppercase { + text-transform: uppercase !important; +} +.\!lowercase { + text-transform: lowercase !important; +} diff --git a/src/scss/text/_white-space.scss b/src/scss/text/_white-space.scss new file mode 100644 index 00000000..1556cff3 --- /dev/null +++ b/src/scss/text/_white-space.scss @@ -0,0 +1,12 @@ +.whitespace-normal { + white-space: normal; +} +.whitespace-nowrap { + white-space: nowrap; +} +.\!whitespace-normal { + white-space: normal !important; +} +.\!whitespace-nowrap { + white-space: nowrap !important; +} diff --git a/src/scss/text/_word-break.scss b/src/scss/text/_word-break.scss new file mode 100644 index 00000000..7240a18a --- /dev/null +++ b/src/scss/text/_word-break.scss @@ -0,0 +1,14 @@ +.break-normal { + overflow-wrap: normal; + word-break: normal; +} +.break-words { + overflow-wrap: break-word; +} +.\!break-normal { + overflow-wrap: normal !important; + word-break: normal !important; +} +.\!break-words { + overflow-wrap: break-word !important; +}