unigrid.css 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +101 -101
  2. package/dist/dropdown.js +36 -36
  3. package/dist/scrollspy.js +57 -57
  4. package/dist/tabs.js +30 -30
  5. package/dist/unigrid.css +4608 -4501
  6. package/dist/unigrid.js +173 -124
  7. package/dist/unigrid.min.css +1 -1
  8. package/dist/unigrid.min.js +1 -1
  9. package/package.json +70 -41
  10. package/src/js/dropdown.js +49 -49
  11. package/src/js/index.js +20 -19
  12. package/src/js/modal.js +81 -0
  13. package/src/js/scrollspy.js +87 -87
  14. package/src/js/tabs.js +58 -58
  15. package/src/scss/_accordion.scss +123 -123
  16. package/src/scss/_broadside.scss +125 -125
  17. package/src/scss/_buttons.scss +241 -241
  18. package/src/scss/_card.scss +168 -168
  19. package/src/scss/_components.scss +140 -140
  20. package/src/scss/_container.scss +53 -53
  21. package/src/scss/_dropdown.scss +178 -178
  22. package/src/scss/_footer.scss +147 -147
  23. package/src/scss/_formats.scss +64 -64
  24. package/src/scss/_forms.scss +192 -192
  25. package/src/scss/_grid.scss +114 -114
  26. package/src/scss/_header.scss +169 -169
  27. package/src/scss/_hero.scss +262 -262
  28. package/src/scss/_mixins.scss +120 -120
  29. package/src/scss/_modal.scss +158 -0
  30. package/src/scss/_modules.scss +238 -238
  31. package/src/scss/_navbar.scss +341 -341
  32. package/src/scss/_pagination.scss +160 -160
  33. package/src/scss/_prose.scss +393 -393
  34. package/src/scss/_reset.scss +82 -82
  35. package/src/scss/_scrollspy.scss +62 -62
  36. package/src/scss/_section.scss +91 -91
  37. package/src/scss/_sidebar.scss +147 -147
  38. package/src/scss/_table.scss +122 -122
  39. package/src/scss/_tabs.scss +178 -178
  40. package/src/scss/_typography.scss +105 -105
  41. package/src/scss/_utilities.scss +79 -79
  42. package/src/scss/_variables.scss +183 -183
  43. package/src/scss/unigrid.scss +50 -49
  44. package/dist/index.js +0 -5
@@ -1,82 +1,82 @@
1
- // ==========================================================================
2
- // Unigrid CSS Framework — Reset / Base
3
- //
4
- // Line-height and font sizing aligned to Gutenberg vertical rhythm.
5
- // ==========================================================================
6
-
7
-
8
- @use "variables" as *;
9
- @use "mixins" as *;
10
-
11
- *,
12
- *::before,
13
- *::after {
14
- box-sizing: border-box;
15
- margin: 0;
16
- padding: 0;
17
- }
18
-
19
- :root {
20
- font-family: $ug-font-family;
21
- font-feature-settings: 'liga' 1, 'calt' 1, 'ss07' 1; /* fix for Chrome */
22
- }
23
- @supports (font-variation-settings: normal) {
24
- :root { font-family: $ug-font-family-variable; }
25
- }
26
-
27
- html {
28
- font-size: #{$ug-base}px;
29
- font-size: #{$ug-base-font-size};
30
- -webkit-text-size-adjust: 100%;
31
- --ug-leading: #{$ug-leading}px;
32
- line-height: var(--ug-leading);
33
-
34
- @media screen and (min-width: #{$ug-prose-max-width}) {
35
- font-size: #{$ug-base-desktop}px;
36
- font-size: #{$ug-base-font-size-desktop};
37
- --ug-leading: #{$ug-leading-desktop}px;
38
- }
39
- }
40
-
41
- body {
42
- font-family: $ug-font-family;
43
- font-feature-settings: 'liga' 1, 'calt' 1, 'ss07' 1;
44
- @include ug-font-size("base");
45
- @include ug-font-weight("regular");
46
- color: $ug-black;
47
- background-color: $ug-white;
48
- -webkit-font-smoothing: antialiased;
49
- -moz-osx-font-smoothing: grayscale;
50
- }
51
-
52
- @supports (font-variation-settings: normal) {
53
- body {
54
- font-family: $ug-font-family-variable;
55
- }
56
- }
57
-
58
- img,
59
- svg,
60
- video {
61
- display: block;
62
- max-width: 100%;
63
- height: auto;
64
- }
65
-
66
- a {
67
- color: inherit;
68
- text-decoration: underline;
69
- }
70
-
71
- table {
72
- border-collapse: collapse;
73
- border-spacing: 0;
74
- }
75
-
76
- button,
77
- input,
78
- select,
79
- textarea {
80
- font: inherit;
81
- color: inherit;
82
- }
1
+ // ==========================================================================
2
+ // Unigrid CSS Framework — Reset / Base
3
+ //
4
+ // Line-height and font sizing aligned to Gutenberg vertical rhythm.
5
+ // ==========================================================================
6
+
7
+
8
+ @use "variables" as *;
9
+ @use "mixins" as *;
10
+
11
+ *,
12
+ *::before,
13
+ *::after {
14
+ box-sizing: border-box;
15
+ margin: 0;
16
+ padding: 0;
17
+ }
18
+
19
+ :root {
20
+ font-family: $ug-font-family;
21
+ font-feature-settings: 'liga' 1, 'calt' 1, 'ss07' 1; /* fix for Chrome */
22
+ }
23
+ @supports (font-variation-settings: normal) {
24
+ :root { font-family: $ug-font-family-variable; }
25
+ }
26
+
27
+ html {
28
+ font-size: #{$ug-base}px;
29
+ font-size: #{$ug-base-font-size};
30
+ -webkit-text-size-adjust: 100%;
31
+ --ug-leading: #{$ug-leading}px;
32
+ line-height: var(--ug-leading);
33
+
34
+ @media screen and (min-width: #{$ug-prose-max-width}) {
35
+ font-size: #{$ug-base-desktop}px;
36
+ font-size: #{$ug-base-font-size-desktop};
37
+ --ug-leading: #{$ug-leading-desktop}px;
38
+ }
39
+ }
40
+
41
+ body {
42
+ font-family: $ug-font-family;
43
+ font-feature-settings: 'liga' 1, 'calt' 1, 'ss07' 1;
44
+ @include ug-font-size("base");
45
+ @include ug-font-weight("regular");
46
+ color: $ug-black;
47
+ background-color: $ug-white;
48
+ -webkit-font-smoothing: antialiased;
49
+ -moz-osx-font-smoothing: grayscale;
50
+ }
51
+
52
+ @supports (font-variation-settings: normal) {
53
+ body {
54
+ font-family: $ug-font-family-variable;
55
+ }
56
+ }
57
+
58
+ img,
59
+ svg,
60
+ video {
61
+ display: block;
62
+ max-width: 100%;
63
+ height: auto;
64
+ }
65
+
66
+ a {
67
+ color: inherit;
68
+ text-decoration: underline;
69
+ }
70
+
71
+ table {
72
+ border-collapse: collapse;
73
+ border-spacing: 0;
74
+ }
75
+
76
+ button,
77
+ input,
78
+ select,
79
+ textarea {
80
+ font: inherit;
81
+ color: inherit;
82
+ }
@@ -1,62 +1,62 @@
1
- // ==========================================================================
2
- // Unigrid CSS Framework — Scrollspy (BEM)
3
- //
4
- // Highlights navigation links based on scroll position.
5
- // Requires scrollspy.js for IntersectionObserver-based tracking.
6
- //
7
- // Block: .ug-scrollspy
8
- // Elements: __nav, __link
9
- // Modifiers: __link--active
10
- //
11
- // Usage:
12
- // <nav class="ug-scrollspy" data-ug-scrollspy>
13
- // <a class="ug-scrollspy__link" href="#section1">Section 1</a>
14
- // <a class="ug-scrollspy__link" href="#section2">Section 2</a>
15
- // </nav>
16
- // ==========================================================================
17
-
18
- @use "variables" as *;
19
- @use "mixins" as *;
20
-
21
- .ug-scrollspy {
22
- position: sticky;
23
- top: var(--ug-leading);
24
- align-self: flex-start;
25
-
26
- &__nav {
27
- display: flex;
28
- flex-direction: column;
29
- list-style: none;
30
- margin: 0;
31
- padding: 0;
32
- border-left: 2px solid $ug-light-gray;
33
- }
34
-
35
- &__link {
36
- display: block;
37
- padding: calc(var(--ug-leading) * 0.25) var(--ug-leading);
38
- @include ug-font-size("sm");
39
- @include ug-rhythm-line-height(1);
40
- color: $ug-medium-gray;
41
- text-decoration: none;
42
- border-left: 2px solid transparent;
43
- margin-left: -2px;
44
- transition: color 0.15s, border-color 0.15s;
45
-
46
- &:hover {
47
- color: $ug-black;
48
- }
49
-
50
- &--active {
51
- color: $ug-black;
52
- @include ug-font-weight("bold");
53
- border-left-color: $ug-black;
54
- }
55
- }
56
-
57
- // Nested (indented sub-sections)
58
- &__link--nested {
59
- padding-left: calc(var(--ug-leading) * 1.5);
60
- @include ug-font-size("xs");
61
- }
62
- }
1
+ // ==========================================================================
2
+ // Unigrid CSS Framework — Scrollspy (BEM)
3
+ //
4
+ // Highlights navigation links based on scroll position.
5
+ // Requires scrollspy.js for IntersectionObserver-based tracking.
6
+ //
7
+ // Block: .ug-scrollspy
8
+ // Elements: __nav, __link
9
+ // Modifiers: __link--active
10
+ //
11
+ // Usage:
12
+ // <nav class="ug-scrollspy" data-ug-scrollspy>
13
+ // <a class="ug-scrollspy__link" href="#section1">Section 1</a>
14
+ // <a class="ug-scrollspy__link" href="#section2">Section 2</a>
15
+ // </nav>
16
+ // ==========================================================================
17
+
18
+ @use "variables" as *;
19
+ @use "mixins" as *;
20
+
21
+ .ug-scrollspy {
22
+ position: sticky;
23
+ top: var(--ug-leading);
24
+ align-self: flex-start;
25
+
26
+ &__nav {
27
+ display: flex;
28
+ flex-direction: column;
29
+ list-style: none;
30
+ margin: 0;
31
+ padding: 0;
32
+ border-left: 2px solid $ug-light-gray;
33
+ }
34
+
35
+ &__link {
36
+ display: block;
37
+ padding: calc(var(--ug-leading) * 0.25) var(--ug-leading);
38
+ @include ug-font-size("sm");
39
+ @include ug-rhythm-line-height(1);
40
+ color: $ug-medium-gray;
41
+ text-decoration: none;
42
+ border-left: 2px solid transparent;
43
+ margin-left: -2px;
44
+ transition: color 0.15s, border-color 0.15s;
45
+
46
+ &:hover {
47
+ color: $ug-black;
48
+ }
49
+
50
+ &--active {
51
+ color: $ug-black;
52
+ @include ug-font-weight("bold");
53
+ border-left-color: $ug-black;
54
+ }
55
+ }
56
+
57
+ // Nested (indented sub-sections)
58
+ &__link--nested {
59
+ padding-left: calc(var(--ug-leading) * 1.5);
60
+ @include ug-font-size("xs");
61
+ }
62
+ }
@@ -1,91 +1,91 @@
1
- // ==========================================================================
2
- // Unigrid CSS Framework — Section Title (BEM)
3
- //
4
- // The signature black band with white heading spanning the full width.
5
- // Padding aligned to the vertical rhythm (leading multiples).
6
- //
7
- // Block: .ug-section
8
- // Elements: __title, __subtitle
9
- // Modifiers: --brown, --red, --green, --blue, --light, --compact, --large
10
- // ==========================================================================
11
-
12
-
13
- @use "variables" as *;
14
- @use "mixins" as *;
15
-
16
- .ug-section {
17
- width: 100%;
18
- background-color: $ug-black;
19
- color: $ug-white;
20
- padding: var(--ug-leading) calc(var(--ug-leading) * 1.5);
21
-
22
- // -- Title --
23
- &__title {
24
- @include ug-rhythm-font-size(1.6875);
25
- @include ug-rhythm-line-height(1.5);
26
- @include ug-font-weight("black");
27
- letter-spacing: -0.01em;
28
- margin: 0;
29
- }
30
-
31
- // -- Subtitle --
32
- &__subtitle {
33
- @include ug-font-size("sm");
34
- @include ug-font-weight("light");
35
- @include ug-rhythm-line-height(1);
36
- opacity: 0.7;
37
- margin: 0;
38
- }
39
-
40
- // ==============================
41
- // Size Modifiers
42
- // ==============================
43
-
44
- &--compact {
45
- padding: calc(var(--ug-leading) * 0.5) calc(var(--ug-leading) * 1.5);
46
-
47
- .ug-section__title {
48
- @include ug-rhythm-font-size(1.2);
49
- @include ug-rhythm-line-height(1);
50
- }
51
- }
52
-
53
- &--large {
54
- padding: calc(var(--ug-leading) * 2) calc(var(--ug-leading) * 1.5);
55
-
56
- .ug-section__title {
57
- @include ug-rhythm-font-size(2.5);
58
- @include ug-rhythm-line-height(2);
59
- }
60
- }
61
-
62
- // ==============================
63
- // Color Modifiers
64
- // ==============================
65
-
66
- &--brown { background-color: $ug-brown; }
67
- &--red { background-color: $ug-red; }
68
- &--green { background-color: $ug-green; }
69
- &--blue { background-color: $ug-blue; }
70
-
71
- &--light {
72
- background-color: $ug-warm-gray;
73
- color: $ug-black;
74
- }
75
-
76
- // ==============================
77
- // Responsive
78
- // ==============================
79
-
80
- @include ug-breakpoint-down("md") {
81
- padding: var(--ug-leading) var(--ug-leading);
82
-
83
- &--large {
84
- padding: calc(var(--ug-leading) * 1.5) var(--ug-leading);
85
- }
86
-
87
- &--compact {
88
- padding: calc(var(--ug-leading) * 0.5) var(--ug-leading);
89
- }
90
- }
91
- }
1
+ // ==========================================================================
2
+ // Unigrid CSS Framework — Section Title (BEM)
3
+ //
4
+ // The signature black band with white heading spanning the full width.
5
+ // Padding aligned to the vertical rhythm (leading multiples).
6
+ //
7
+ // Block: .ug-section
8
+ // Elements: __title, __subtitle
9
+ // Modifiers: --brown, --red, --green, --blue, --light, --compact, --large
10
+ // ==========================================================================
11
+
12
+
13
+ @use "variables" as *;
14
+ @use "mixins" as *;
15
+
16
+ .ug-section {
17
+ width: 100%;
18
+ background-color: $ug-black;
19
+ color: $ug-white;
20
+ padding: var(--ug-leading) calc(var(--ug-leading) * 1.5);
21
+
22
+ // -- Title --
23
+ &__title {
24
+ @include ug-rhythm-font-size(1.6875);
25
+ @include ug-rhythm-line-height(1.5);
26
+ @include ug-font-weight("black");
27
+ letter-spacing: -0.01em;
28
+ margin: 0;
29
+ }
30
+
31
+ // -- Subtitle --
32
+ &__subtitle {
33
+ @include ug-font-size("sm");
34
+ @include ug-font-weight("light");
35
+ @include ug-rhythm-line-height(1);
36
+ opacity: 0.7;
37
+ margin: 0;
38
+ }
39
+
40
+ // ==============================
41
+ // Size Modifiers
42
+ // ==============================
43
+
44
+ &--compact {
45
+ padding: calc(var(--ug-leading) * 0.5) calc(var(--ug-leading) * 1.5);
46
+
47
+ .ug-section__title {
48
+ @include ug-rhythm-font-size(1.2);
49
+ @include ug-rhythm-line-height(1);
50
+ }
51
+ }
52
+
53
+ &--large {
54
+ padding: calc(var(--ug-leading) * 2) calc(var(--ug-leading) * 1.5);
55
+
56
+ .ug-section__title {
57
+ @include ug-rhythm-font-size(2.5);
58
+ @include ug-rhythm-line-height(2);
59
+ }
60
+ }
61
+
62
+ // ==============================
63
+ // Color Modifiers
64
+ // ==============================
65
+
66
+ &--brown { background-color: $ug-brown; }
67
+ &--red { background-color: $ug-red; }
68
+ &--green { background-color: $ug-green; }
69
+ &--blue { background-color: $ug-blue; }
70
+
71
+ &--light {
72
+ background-color: $ug-warm-gray;
73
+ color: $ug-black;
74
+ }
75
+
76
+ // ==============================
77
+ // Responsive
78
+ // ==============================
79
+
80
+ @include ug-breakpoint-down("md") {
81
+ padding: var(--ug-leading) var(--ug-leading);
82
+
83
+ &--large {
84
+ padding: calc(var(--ug-leading) * 1.5) var(--ug-leading);
85
+ }
86
+
87
+ &--compact {
88
+ padding: calc(var(--ug-leading) * 0.5) var(--ug-leading);
89
+ }
90
+ }
91
+ }