@nappr/nappr-styles 0.3.2 → 0.3.5

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 (125) hide show
  1. package/README.md +33 -20
  2. package/dist/styles.css +7745 -1
  3. package/dist/styles.css.map +1 -1
  4. package/dist/styles.min.css +3 -0
  5. package/dist/styles.min.css.map +1 -0
  6. package/docs/_coverpage.md +2 -2
  7. package/docs/_sidebar.md +2 -2
  8. package/docs/docs.theme.css +2 -1
  9. package/docs/docs.theme.css.map +1 -1
  10. package/docs/index.html +1 -1
  11. package/docs/pages/displays.md +26 -8
  12. package/docs/pages/grid.md +365 -0
  13. package/docs/pages/helpers.md +30 -18
  14. package/docs/pages/quick-start.md +100 -14
  15. package/docs/temp.scss +122 -0
  16. package/index.d.ts +25 -0
  17. package/package.json +49 -14
  18. package/sass/_globals.module.scss +43 -0
  19. package/sass/_globals.scss +79 -0
  20. package/sass/components/_.scss +2 -0
  21. package/sass/components/_badge.scss +58 -0
  22. package/sass/components/_button.scss +244 -0
  23. package/sass/components/_nav.scss +95 -0
  24. package/sass/components/scrollbar/_.scss +102 -0
  25. package/sass/configs/_.scss +7 -0
  26. package/sass/configs/_breakpoints.scss +12 -0
  27. package/sass/configs/_defaults.scss +6 -0
  28. package/sass/configs/_grid.scss +10 -0
  29. package/sass/configs/_palettes.scss +72 -0
  30. package/sass/configs/_spacing.scss +36 -0
  31. package/sass/configs/_text.scss +39 -0
  32. package/sass/configs/_themes.scss +24 -0
  33. package/sass/core/funcs/_list.scss +43 -0
  34. package/sass/core/funcs/_map.scss +42 -0
  35. package/sass/core/funcs/_math.scss +35 -0
  36. package/sass/core/funcs/_string.scss +47 -0
  37. package/sass/core/mixins/_.scss +3 -0
  38. package/{lib → sass/core}/mixins/_links.scss +2 -2
  39. package/sass/core/mixins/_media-queries.scss +22 -0
  40. package/sass/core/mixins/_typography.scss +26 -0
  41. package/sass/core/placeholders/_.scss +4 -0
  42. package/sass/core/placeholders/_dimensions.scss +31 -0
  43. package/sass/core/placeholders/_flexbox.scss +11 -0
  44. package/sass/core/placeholders/_lists.scss +41 -0
  45. package/sass/core/placeholders/_positions.scss +19 -0
  46. package/sass/core/placeholders/_typography.scss +10 -0
  47. package/sass/elements/_.scss +6 -0
  48. package/sass/elements/_dialog.scss +13 -0
  49. package/{lib/htmls → sass/elements}/_form.scss +28 -6
  50. package/sass/elements/_links.scss +132 -0
  51. package/sass/elements/_lists.scss +11 -0
  52. package/{lib/htmls → sass/elements}/_table.scss +2 -6
  53. package/sass/elements/_typography.scss +13 -0
  54. package/sass/layout/grid/_.scss +4 -0
  55. package/sass/layout/grid/_columns.scss +32 -0
  56. package/sass/layout/grid/_gaps.scss +42 -0
  57. package/sass/layout/grid/_grid.scss +158 -0
  58. package/sass/layout/grid/_offsets.scss +35 -0
  59. package/sass/main.scss +59 -0
  60. package/sass/resets/_.scss +5 -0
  61. package/sass/resets/_base.scss +69 -0
  62. package/sass/resets/_nappr.scss +83 -0
  63. package/sass/themes/_dark.scss +17 -0
  64. package/sass/themes/_dracula.scss +17 -0
  65. package/sass/themes/_github-light.scss +17 -0
  66. package/sass/themes/_light.scss +17 -0
  67. package/sass/themes/_monokai-pro.scss +17 -0
  68. package/sass/themes/_night-owl.scss +17 -0
  69. package/sass/themes/_nord.scss +17 -0
  70. package/sass/themes/_tokyo-night.scss +17 -0
  71. package/sass/utilities/_.scss +21 -0
  72. package/sass/utilities/_dimensions.scss +11 -0
  73. package/sass/utilities/_displays.scss +127 -0
  74. package/sass/utilities/_flexbox.scss +102 -0
  75. package/{lib/helpers → sass/utilities}/_floats.scss +10 -15
  76. package/sass/utilities/_lists.scss +86 -0
  77. package/sass/utilities/_negates.scss +121 -0
  78. package/sass/utilities/_palette.scss +11 -0
  79. package/sass/utilities/_scrolls.scss +78 -0
  80. package/sass/utilities/_spacers.scss +120 -0
  81. package/sass/utilities/_square-grid.scss +33 -0
  82. package/sass/utilities/_typography.scss +106 -0
  83. package/sass/utilities/_visibility.scss +60 -0
  84. package/sass/utilities/_wrap.scss +12 -0
  85. package/styles.scss +5 -1
  86. package/lib/_globals.scss +0 -16
  87. package/lib/_reset.scss +0 -223
  88. package/lib/customs/scrollbar.scss +0 -40
  89. package/lib/funcs/_.scss +0 -5
  90. package/lib/funcs/_get-color.scss +0 -3
  91. package/lib/funcs/_math.scss +0 -5
  92. package/lib/funcs/_merge-palette.scss +0 -12
  93. package/lib/funcs/_rem.scss +0 -104
  94. package/lib/funcs/_strings.scss +0 -35
  95. package/lib/grid/_.scss +0 -4
  96. package/lib/grid/_col.scss +0 -117
  97. package/lib/grid/_row.scss +0 -117
  98. package/lib/grid/_square.scss +0 -34
  99. package/lib/grid/_wrap.scss +0 -39
  100. package/lib/helpers/_.scss +0 -9
  101. package/lib/helpers/_displays.scss +0 -151
  102. package/lib/helpers/_flexbox.scss +0 -105
  103. package/lib/helpers/_margins.scss +0 -13
  104. package/lib/helpers/_negates.scss +0 -171
  105. package/lib/helpers/_scrolls.scss +0 -55
  106. package/lib/helpers/_texts.scss +0 -101
  107. package/lib/helpers/_visibility.scss +0 -34
  108. package/lib/htmls/_.scss +0 -4
  109. package/lib/htmls/_headings.scss +0 -29
  110. package/lib/htmls/_links.scss +0 -11
  111. package/lib/mixins/_.scss +0 -9
  112. package/lib/mixins/_border-radius.scss +0 -61
  113. package/lib/mixins/_border.scss +0 -48
  114. package/lib/mixins/_dimensions.scss +0 -48
  115. package/lib/mixins/_font-size.scss +0 -22
  116. package/lib/mixins/_line-height.scss +0 -19
  117. package/lib/mixins/_margin-padding.scss +0 -66
  118. package/lib/mixins/_root-variables.scss +0 -11
  119. package/lib/mixins/_theme.scss +0 -25
  120. package/lib/styles.scss +0 -19
  121. package/lib/variables/_.scss +0 -4
  122. package/lib/variables/_breakpoints.scss +0 -5
  123. package/lib/variables/_colors.scss +0 -60
  124. package/lib/variables/_defaults.scss +0 -53
  125. /package/{lib/helpers → sass/utilities}/_pointers.scss +0 -0
@@ -0,0 +1,42 @@
1
+ // ----------------------------------
2
+ // Imports
3
+ // ----------------------------------
4
+ @forward 'sass:map';
5
+ @use 'sass:map' as map;
6
+ @use 'sass:list' as list;
7
+ @use 'sass:math' as math;
8
+
9
+ // ----------------------------------
10
+ // Functions
11
+ // ----------------------------------
12
+
13
+ /**
14
+ * Generate a map by mirroring the values of a list
15
+ * @param {list} $list - The list to generate the map from
16
+ * @return {map} - The map of keys and values
17
+ */
18
+ @function mirror($list) {
19
+ $map: ();
20
+
21
+ @each $key in $list {
22
+ $map: map.set($map, $key, $key);
23
+ }
24
+
25
+ @return $map;
26
+ }
27
+
28
+ /**
29
+ * Generate a map of numbers with the index of each value in a map
30
+ * @param {map} $map - The map to generate the list from
31
+ * @return {list} - The list of numbers
32
+ */
33
+ @function each-index($list) {
34
+ $next: ();
35
+
36
+ @each $value in $list {
37
+ $i: list.index($list, $value);
38
+ $next: map.set($next, $i, $value);
39
+ }
40
+
41
+ @return $next;
42
+ }
@@ -0,0 +1,35 @@
1
+ // ----------------------------------
2
+ // Imports
3
+ // ----------------------------------
4
+ @forward 'sass:math';
5
+
6
+ // ----------------------------------
7
+ // Functions
8
+ // ----------------------------------
9
+ @function number-to-pixel($size: 0) {
10
+ @return ($size * 1px);
11
+ }
12
+
13
+ @function number-to-percent($size: 0) {
14
+ @return ($size * 1%);
15
+ }
16
+
17
+ @function number-to-rem($size: 0) {
18
+ @return ($size * 1rem);
19
+ }
20
+
21
+ @function number-to-em($size: 0) {
22
+ @return ($size * 1em);
23
+ }
24
+
25
+ @function number-to-vh($size: 0) {
26
+ @return ($size * 1vh);
27
+ }
28
+
29
+ @function number-to-vw($size: 0) {
30
+ @return ($size * 1vw);
31
+ }
32
+
33
+ @function calculate-line-height($font-size-rem) {
34
+ @return $font-size-rem + 0.5rem;
35
+ }
@@ -0,0 +1,47 @@
1
+ // ----------------------------------
2
+ // Imports
3
+ // ----------------------------------
4
+ @forward 'sass:string';
5
+ @use 'sass:list' as list;
6
+ @use 'sass:string' as string;
7
+
8
+ // ----------------------------------
9
+ // Functions
10
+ // ----------------------------------
11
+ @function concat($string1, $string2) {
12
+ @return '#{$string1}#{$string2}';
13
+ }
14
+
15
+ @function contains($list, $value) {
16
+ @return not not list.index($list, $value);
17
+ }
18
+
19
+ @function capitalize($string) {
20
+ @return string.to-upper-case(string.slice($string, 1, 1)) +
21
+ string.slice($string, 2);
22
+ }
23
+
24
+ @function uncapitalize($string) {
25
+ @return string.to-lower-case(string.slice($string, 1, 1)) +
26
+ string.slice($string, 2);
27
+ }
28
+
29
+ @function camelize($string) {
30
+ $progress: string.to-lower-case($string);
31
+ $result: '';
32
+ $exclude: ' ', '-', '–', '—', '_', ',', ';', ':', '.';
33
+
34
+ @while list.length($progress) > 0 {
35
+ $char: string.slice($progress, 1, 1);
36
+
37
+ @if contains($exclude, $char) {
38
+ $progress: capitalize(string.slice($progress, 2, 2)) +
39
+ string.slice($progress, 3);
40
+ } @else {
41
+ $result: $result + $char;
42
+ $progress: string.slice($progress, 2);
43
+ }
44
+ }
45
+
46
+ @return $result;
47
+ }
@@ -0,0 +1,3 @@
1
+ @forward 'links';
2
+ @forward 'media-queries';
3
+ @forward 'typography';
@@ -1,6 +1,6 @@
1
1
  // NOTE
2
- // a: hover DOIT venir après: lien et a: visited
3
- // a: active doit venir après un: hover
2
+ // a:hover MUST come after: link and a:visited
3
+ // a:active must come after a:hover
4
4
  @mixin as-link($color) {
5
5
  &,
6
6
  &:link,
@@ -0,0 +1,22 @@
1
+ @use '../funcs/map' as map;
2
+ @use '../../configs/' as configs;
3
+
4
+ @mixin media-query($key, $condition) {
5
+ $value: map.get(configs.$NAPPR_BREAKPOINTS, $key);
6
+
7
+ @media (#{$condition}-width: #{$value}) {
8
+ @content;
9
+ }
10
+ }
11
+
12
+ @mixin media-query-min($breakpoint-key) {
13
+ @include media-query($breakpoint-key, 'min') {
14
+ @content;
15
+ }
16
+ }
17
+
18
+ @mixin media-query-max($breakpoint-key) {
19
+ @include media-query($breakpoint-key, 'max') {
20
+ @content;
21
+ }
22
+ }
@@ -0,0 +1,26 @@
1
+ @use '../placeholders/' as *;
2
+ @use '../funcs/map' as map;
3
+ @use '../funcs/math' as math;
4
+ @use 'media-queries' as media-queries;
5
+
6
+ @mixin generate-heading-styles($map, $prefix: '') {
7
+ @each $key, $values in $map {
8
+ $selector: if($prefix == '', #{$key}, '#{$prefix}-#{$key}');
9
+
10
+ #{$selector} {
11
+ @extend %heading-base;
12
+
13
+ $fs-base: map.get($values, 'base');
14
+
15
+ font-size: $fs-base;
16
+ line-height: math.calculate-line-height($fs-base);
17
+
18
+ @include media-queries.media-query-min('xl') {
19
+ $fs-xl: map.get($values, 'xl');
20
+
21
+ font-size: $fs-xl;
22
+ line-height: math.calculate-line-height($fs-xl);
23
+ }
24
+ }
25
+ }
26
+ }
@@ -0,0 +1,4 @@
1
+ @forward 'dimensions';
2
+ @forward 'flexbox';
3
+ @forward 'positions';
4
+ @forward 'typography';
@@ -0,0 +1,31 @@
1
+ %is-full-width {
2
+ max-width: 100%;
3
+ min-width: 100%;
4
+ width: 100%;
5
+ }
6
+
7
+ %is-full-height {
8
+ height: 100%;
9
+ max-height: 100%;
10
+ min-height: 100%;
11
+ }
12
+
13
+ %is-full-layout {
14
+ @extend %is-full-width;
15
+ @extend %is-full-height;
16
+ }
17
+
18
+ %is-viewport-height {
19
+ height: 100vh;
20
+ height: 100dvh;
21
+ }
22
+
23
+ %is-viewport-width {
24
+ width: 100vw;
25
+ width: 100dvw;
26
+ }
27
+
28
+ %is-viewport-layout {
29
+ @extend %is-viewport-height;
30
+ @extend %is-viewport-width;
31
+ }
@@ -0,0 +1,11 @@
1
+ %flex-base {
2
+ display: flex;
3
+ flex: 1;
4
+ }
5
+
6
+ %flex-wrapper {
7
+ @extend %flex-base;
8
+
9
+ flex-flow: row wrap;
10
+ justify-content: space-between;
11
+ }
@@ -0,0 +1,41 @@
1
+ %nappr-list-base {
2
+ --nappr-xl-size: var(--nappr-xl-base);
3
+
4
+ margin: 0;
5
+ margin-block: 0;
6
+ padding: 0;
7
+ padding-inline-start: 0;
8
+ }
9
+
10
+ %nappr-list-item-base {
11
+ --nappr-xl-base: calc(var(--nappr-xl-size) * 0.9);
12
+
13
+ padding-bottom: 0;
14
+ }
15
+
16
+ %nappr-list-type--unstyled {
17
+ @extend %nappr-list-base;
18
+
19
+ list-style-type: none;
20
+
21
+ li,
22
+ dt,
23
+ dd {
24
+ @extend %nappr-list-item-base;
25
+ }
26
+ }
27
+
28
+ %nappr-list-type--styled {
29
+ @extend %nappr-list-base;
30
+
31
+ margin-block: 0.5rem;
32
+ padding-inline-start: 1rem;
33
+
34
+ li,
35
+ dt,
36
+ dd {
37
+ @extend %nappr-list-item-base;
38
+
39
+ padding-bottom: 0.25rem;
40
+ }
41
+ }
@@ -0,0 +1,19 @@
1
+ %position-absolute {
2
+ position: absolute;
3
+ }
4
+
5
+ %position-fixed {
6
+ position: fixed;
7
+ }
8
+
9
+ %position-relative {
10
+ position: relative;
11
+ }
12
+
13
+ %position-sticky {
14
+ position: sticky;
15
+ }
16
+
17
+ %is-all-edges {
18
+ inset: 0;
19
+ }
@@ -0,0 +1,10 @@
1
+ %heading-base {
2
+ font-weight: 700;
3
+ margin: var(--nappr-text-spacing);
4
+ }
5
+
6
+ %text-base {
7
+ font-size: 1rem;
8
+ line-height: 1.5rem;
9
+ margin: var(--nappr-text-spacing);
10
+ }
@@ -0,0 +1,6 @@
1
+ @use './dialog';
2
+ @use './form';
3
+ @use './links';
4
+ @use './lists';
5
+ @use './table';
6
+ @use './typography';
@@ -0,0 +1,13 @@
1
+ dialog {
2
+ backdrop-filter: blur(5px);
3
+
4
+ &::backdrop {
5
+ backdrop-filter: blur(5px);
6
+ opacity: 0;
7
+ transition: opacity 0.3s ease-out;
8
+ }
9
+
10
+ &[open]::backdrop {
11
+ opacity: 1;
12
+ }
13
+ }
@@ -21,9 +21,31 @@
21
21
  cursor: default;
22
22
  }
23
23
 
24
- .no-click,
25
- .not-allowed {
26
- cursor: not-allowed;
24
+ form {
25
+ > section {
26
+ border-style: solid;
27
+ border-width: 1px;
28
+ margin-bottom: 4rem;
29
+
30
+ > h1,
31
+ > h2,
32
+ > h3,
33
+ > h4,
34
+ > h5,
35
+ > h6 {
36
+ display: inline-block;
37
+ font-weight: bold;
38
+ left: 1.8rem;
39
+ padding: 1rem;
40
+ position: relative;
41
+ top: -1.8rem;
42
+ z-index: 0;
43
+ }
44
+
45
+ > div {
46
+ padding: 0 2rem 1.25rem;
47
+ }
48
+ }
27
49
  }
28
50
 
29
51
  input,
@@ -55,8 +77,8 @@ input[type='checkbox'] {
55
77
  }
56
78
 
57
79
  input[type='search'] {
58
- -webkit-appearance: textfield;
59
- -webkit-box-sizing: content-box;
80
+ appearance: textfield;
81
+ box-sizing: content-box;
60
82
  }
61
83
 
62
84
  button,
@@ -68,7 +90,7 @@ input[type='submit'] {
68
90
  }
69
91
 
70
92
  textarea {
71
- line-height: 1.2em;
93
+ line-height: 1.2rem;
72
94
  min-height: 2.4rem;
73
95
  overflow: auto;
74
96
  resize: vertical;
@@ -0,0 +1,132 @@
1
+ [href] {
2
+ color: var(--nappr-theme-text-primary);
3
+ font-size: 1rem;
4
+ -webkit-tap-highlight-color: transparent;
5
+ text-decoration: none;
6
+
7
+ &:link,
8
+ &:visited,
9
+ &:active {
10
+ text-decoration: none;
11
+ }
12
+
13
+ &:hover {
14
+ text-decoration: underline;
15
+ }
16
+ }
17
+
18
+ // font-weight: 700;
19
+ // height: 100%;
20
+ // justify-content: space-between;
21
+ // line-height: 1.5rem;
22
+ // margin: 0;
23
+ // padding: 0.75rem 1rem;
24
+ // width: 100%;
25
+ // text-align: left;
26
+
27
+ /*
28
+ [href] {
29
+ background-image: var(--underline-img), var(--underline-img);
30
+ background-position:
31
+ var(--underline-x) 100%,
32
+ var(--underline-x) calc(100% - var(--underline-thickness));
33
+ background-repeat: no-repeat, no-repeat;
34
+ background-size:
35
+ var(--underline-hover-width) calc(var(--underline-thickness) * 2),
36
+ var(--underline-idle-width) var(--underline-thickness);
37
+ transition: background-size 0s;
38
+ }
39
+
40
+ @media (hover: hover) and (pointer: fine) {
41
+ a[href]:active,
42
+ button:not(:disabled):active,
43
+ input[type='button']:not(:disabled):active,
44
+ input[type='image']:not(:disabled):active,
45
+ input[type='reset']:not(:disabled):active,
46
+ input[type='submit']:not(:disabled):active {
47
+ background-color: var(--active-tint);
48
+ }
49
+ }
50
+
51
+ @media (hover: hover) and (pointer: fine) {
52
+ a[href]:hover,
53
+ button:not(:disabled):hover,
54
+ input[type='button']:not(:disabled):hover,
55
+ input[type='image']:not(:disabled):hover,
56
+ input[type='reset']:not(:disabled):hover,
57
+ input[type='submit']:not(:disabled):hover {
58
+ background-color: var(--hover-tint);
59
+ }
60
+ }
61
+
62
+ [tabindex]:focus-visible,
63
+ a:focus-visible,
64
+ audio:focus-visible[controls],
65
+ button:focus-visible,
66
+ details:focus-visible,
67
+ details > summary:first-of-type:focus-visible,
68
+ input:focus-visible,
69
+ input[type='button']:focus-visible,
70
+ input[type='checkbox']:focus-visible + label:before,
71
+ input[type='image']:focus-visible,
72
+ input[type='radio']:focus-visible + label:before,
73
+ input[type='reset']:focus-visible,
74
+ input[type='submit']:focus-visible,
75
+ select:focus-visible,
76
+ video:focus-visible[controls] {
77
+ outline-style: solid;
78
+ }
79
+
80
+ [tabindex]:focus:not(:focus-visible),
81
+ a:focus:not(:focus-visible),
82
+ audio:focus:not(:focus-visible)[controls],
83
+ button:focus:not(:focus-visible),
84
+ details:focus:not(:focus-visible),
85
+ details > summary:first-of-type:focus:not(:focus-visible),
86
+ input:focus:not(:focus-visible),
87
+ input[type='button']:focus:not(:focus-visible),
88
+ input[type='checkbox']:focus:not(:focus-visible) + label:before,
89
+ input[type='image']:focus:not(:focus-visible),
90
+ input[type='radio']:focus:not(:focus-visible) + label:before,
91
+ input[type='reset']:focus:not(:focus-visible),
92
+ input[type='submit']:focus:not(:focus-visible),
93
+ select:focus:not(:focus-visible),
94
+ video:focus:not(:focus-visible)[controls] {
95
+ outline-style: none;
96
+ }
97
+ [tabindex]:focus,
98
+ a:focus,
99
+ audio:focus[controls],
100
+ button:focus,
101
+ details:focus,
102
+ details > summary:first-of-type:focus,
103
+ input:focus,
104
+ input[type='button']:focus,
105
+ input[type='checkbox']:focus + label:before,
106
+ input[type='image']:focus,
107
+ input[type='radio']:focus + label:before,
108
+ input[type='reset']:focus,
109
+ input[type='submit']:focus,
110
+ select:focus,
111
+ video:focus[controls] {
112
+ outline-color: #0a76f6;
113
+ outline-offset: 2px;
114
+ outline-style: solid;
115
+ outline-width: 2px;
116
+ }
117
+
118
+ @media (hover: hover) and (pointer: fine) {
119
+ a[href]:active,
120
+ a[href]:hover {
121
+ --underline-hover-width: var(--underline-max-width);
122
+ }
123
+ }
124
+
125
+ a:not(.is-underline),
126
+ a:link:not(.is-underline),
127
+ a:visited:not(.is-underline),
128
+ a:hover:not(.is-underline),
129
+ a:active:not(.is-underline) {
130
+ text-decoration: none;
131
+ }
132
+ */
@@ -0,0 +1,11 @@
1
+ dl,
2
+ ol,
3
+ ul {
4
+ --nappr-default-xl-size: var(--nappr-default-xl-base);
5
+ }
6
+
7
+ dd,
8
+ dt,
9
+ li {
10
+ --nappr-default-xl-base: calc(var(--nappr-default-xl-size) * 0.9);
11
+ }
@@ -1,10 +1,7 @@
1
- @use '../funcs/rem' as rem;
2
-
3
1
  table {
4
- font-size: rem.convert(12px);
5
-
6
2
  border-collapse: collapse;
7
3
  border-spacing: 0;
4
+ font-size: var(--nappr-default-font-size, 0.75rem);
8
5
  max-width: 100%;
9
6
  min-width: 100%;
10
7
  overflow: scroll;
@@ -18,10 +15,9 @@ table th {
18
15
 
19
16
  table th,
20
17
  table td {
21
- padding: rem.convert(12px 15px);
22
-
23
18
  display: table-cell;
24
19
  overflow: hidden;
20
+ padding: 0.75rem 1rem;
25
21
  text-overflow: ellipsis;
26
22
  white-space: nowrap;
27
23
  }
@@ -0,0 +1,13 @@
1
+ @use '../core/placeholders/' as *;
2
+ @use '../core/mixins/' as mixins;
3
+ @use '../configs/' as configs;
4
+
5
+ // ==========================================================
6
+ // TEXT
7
+ // ==========================================================
8
+
9
+ @include mixins.generate-heading-styles(configs.$NAPPR_HEADINGS);
10
+
11
+ p {
12
+ @extend %text-base;
13
+ }
@@ -0,0 +1,4 @@
1
+ @use 'grid';
2
+ @use 'columns';
3
+ @use 'gaps';
4
+ @use 'offsets';
@@ -0,0 +1,32 @@
1
+ @use '../../core/funcs/map' as map;
2
+ @use '../../core/mixins/' as mixins;
3
+ @use '../../configs/' as configs;
4
+
5
+ // Mixin pour générer les classes de colonnes
6
+ @mixin generate-grid-columns($prefix: '') {
7
+ @for $i from 1 through map.get(configs.$NAPPR_GRID, 'columns') {
8
+ .grid#{$prefix}-col-#{$i} {
9
+ grid-column: span #{$i};
10
+ }
11
+ }
12
+ }
13
+
14
+ // Mixin pour générer les classes de template columns
15
+ @mixin generate-grid-template-columns($prefix: '') {
16
+ @for $i from 1 through map.get(configs.$NAPPR_GRID, 'columns') {
17
+ .grid#{$prefix}-cols-#{$i} {
18
+ grid-template-columns: repeat(#{$i}, 1fr);
19
+ }
20
+ }
21
+ }
22
+
23
+ @include generate-grid-columns;
24
+ @include generate-grid-template-columns;
25
+
26
+ // Génération des classes responsives
27
+ @each $key, $value in configs.$NAPPR_BREAKPOINTS {
28
+ @include mixins.media-query-min($key) {
29
+ @include generate-grid-columns('-#{$key}');
30
+ @include generate-grid-template-columns('-#{$key}');
31
+ }
32
+ }
@@ -0,0 +1,42 @@
1
+ @use '../../core/funcs/map' as map;
2
+ @use '../../core/mixins/' as mixins;
3
+ @use '../../configs/' as configs;
4
+
5
+ // --- Utilisation de variables CSS pour les gaps ---
6
+ .grid-gap {
7
+ $value: map.get(configs.$NAPPR_GRID, 'gutter-gap-md');
8
+
9
+ gap: var(--nappr-grid-gutter-gap-md, #{$value});
10
+ }
11
+
12
+ @each $key, $value in configs.$NAPPR_BREAKPOINTS {
13
+ @include mixins.media-query-min($key) {
14
+ .grid-#{$key}--gap {
15
+ $value: map.get(configs.$NAPPR_GRID, 'gutter-gap-#{$key}');
16
+
17
+ gap: var(--nappr-grid-gutter-gap-#{$key}, #{$value});
18
+ }
19
+ }
20
+ }
21
+
22
+ .grid--no-gap {
23
+ gap: 0;
24
+ }
25
+
26
+ @each $key, $value in configs.$NAPPR_BREAKPOINTS {
27
+ @include mixins.media-query-min($key) {
28
+ .grid-#{$key}--no-gap {
29
+ gap: 0;
30
+ }
31
+ }
32
+ }
33
+
34
+ @include mixins.media-query-min('lg') {
35
+ .grid-gap,
36
+ .grid-md-gap,
37
+ .grid-sm-gap {
38
+ $value: map.get(configs.$NAPPR_GRID, 'gutter-gap-lg');
39
+
40
+ gap: var(--nappr-grid-gutter-gap-lg, #{$value});
41
+ }
42
+ }