aboutsummaryrefslogtreecommitdiffstats
path: root/pyblackbird_cc/static/scss/tests/utilities/_api.test.scss
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-09-16 17:12:15 +0100
committerMatthew Lemon <y@yulqen.org>2024-09-16 17:12:15 +0100
commit86bb29b4d378314bd906248e08198c1952d2f0a4 (patch)
tree005bb24dfa6a0e5d911d6cfdda9d469828a387a1 /pyblackbird_cc/static/scss/tests/utilities/_api.test.scss
parent0d3ae1492e1a88db69437cd277b7cf11c4e6274a (diff)
Upgrade to bootstrap 5.3
Diffstat (limited to 'pyblackbird_cc/static/scss/tests/utilities/_api.test.scss')
-rw-r--r--pyblackbird_cc/static/scss/tests/utilities/_api.test.scss75
1 files changed, 75 insertions, 0 deletions
diff --git a/pyblackbird_cc/static/scss/tests/utilities/_api.test.scss b/pyblackbird_cc/static/scss/tests/utilities/_api.test.scss
new file mode 100644
index 0000000..304d8d1
--- /dev/null
+++ b/pyblackbird_cc/static/scss/tests/utilities/_api.test.scss
@@ -0,0 +1,75 @@
+@import "../../functions";
+@import "../../variables";
+@import "../../variables-dark";
+@import "../../maps";
+@import "../../mixins";
+
+$utilities: ();
+
+@include describe("utilities/api") {
+ @include it("generates utilities for each breakpoints") {
+ $utilities: (
+ margin: (
+ property: margin,
+ values: auto
+ ),
+ padding: (
+ property: padding,
+ responsive: true,
+ values: 1rem
+ ),
+ font-size: (
+ property: font-size,
+ values: (large: 1.25rem),
+ print: true
+ )
+ ) !global;
+
+ $grid-breakpoints: (
+ xs: 0,
+ sm: 333px,
+ md: 666px
+ ) !global;
+
+ @include assert() {
+ @include output() {
+ @import "../../utilities/api";
+ }
+
+ @include expect() {
+ // margin is not set to responsive
+ .margin-auto {
+ margin: auto !important;
+ }
+
+ // padding is, though
+ .padding-1rem {
+ padding: 1rem !important;
+ }
+
+ .font-size-large {
+ font-size: 1.25rem !important;
+ }
+
+ @media (min-width: 333px) {
+ .padding-sm-1rem {
+ padding: 1rem !important;
+ }
+ }
+
+ @media (min-width: 666px) {
+ .padding-md-1rem {
+ padding: 1rem !important;
+ }
+ }
+
+ @media print {
+ .font-size-print-large {
+ font-size: 1.25rem !important;
+ }
+ }
+ }
+
+ }
+ }
+}