@nappr/nappr-styles 0.3.3 → 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.
@@ -1,4 +1,9 @@
1
- a {
1
+ [href] {
2
+ color: var(--nappr-theme-text-primary);
3
+ font-size: 1rem;
4
+ -webkit-tap-highlight-color: transparent;
5
+ text-decoration: none;
6
+
2
7
  &:link,
3
8
  &:visited,
4
9
  &:active {
@@ -10,7 +15,113 @@ a {
10
15
  }
11
16
  }
12
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
+
13
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
+
14
125
  a:not(.is-underline),
15
126
  a:link:not(.is-underline),
16
127
  a:visited:not(.is-underline),
@@ -5,7 +5,7 @@
5
5
  // Mixin pour générer les classes de colonnes
6
6
  @mixin generate-grid-columns($prefix: '') {
7
7
  @for $i from 1 through map.get(configs.$NAPPR_GRID, 'columns') {
8
- .grid#{$prefix}--col-#{$i} {
8
+ .grid#{$prefix}-col-#{$i} {
9
9
  grid-column: span #{$i};
10
10
  }
11
11
  }
@@ -14,7 +14,7 @@
14
14
  // Mixin pour générer les classes de template columns
15
15
  @mixin generate-grid-template-columns($prefix: '') {
16
16
  @for $i from 1 through map.get(configs.$NAPPR_GRID, 'columns') {
17
- .grid#{$prefix}--cols-#{$i} {
17
+ .grid#{$prefix}-cols-#{$i} {
18
18
  grid-template-columns: repeat(#{$i}, 1fr);
19
19
  }
20
20
  }
@@ -3,7 +3,7 @@
3
3
  @use '../../configs/' as configs;
4
4
 
5
5
  // --- Utilisation de variables CSS pour les gaps ---
6
- .grid--gap {
6
+ .grid-gap {
7
7
  $value: map.get(configs.$NAPPR_GRID, 'gutter-gap-md');
8
8
 
9
9
  gap: var(--nappr-grid-gutter-gap-md, #{$value});
@@ -32,9 +32,9 @@
32
32
  }
33
33
 
34
34
  @include mixins.media-query-min('lg') {
35
- .grid--gap,
36
- .grid-md--gap,
37
- .grid-sm--gap {
35
+ .grid-gap,
36
+ .grid-md-gap,
37
+ .grid-sm-gap {
38
38
  $value: map.get(configs.$NAPPR_GRID, 'gutter-gap-lg');
39
39
 
40
40
  gap: var(--nappr-grid-gutter-gap-lg, #{$value});
@@ -1,24 +1,52 @@
1
1
  @use '../../core/funcs/map' as map;
2
+ @use '../../core/mixins/' as mixins;
2
3
  @use '../../configs/' as configs;
3
4
 
5
+ %grid-base {
6
+ display: grid;
7
+ gap: map.get(configs.$NAPPR_GRID, 'gutter-gap-sm');
8
+ width: 100%;
9
+ }
10
+
11
+ %grid-fluid-base {
12
+ @extend %grid-base;
13
+
14
+ max-width: none;
15
+ }
16
+
4
17
  // ==========================================================
5
18
  // 1. BASE GRID DEFINITION
6
19
  // ==========================================================
7
20
 
21
+ .grid,
22
+ .grid-sm {
23
+ @extend %grid-base;
24
+ }
25
+
26
+ .grid--fluid,
27
+ .grid-sm--fluid {
28
+ @extend %grid-fluid-base;
29
+ }
30
+
8
31
  .grid,
9
32
  .grid--fluid {
10
- display: grid;
11
- gap: map.get(configs.$NAPPR_GRID, 'gutter-gap-sm');
12
33
  grid-template-columns: repeat(map.get(configs.$NAPPR_GRID, 'columns'), 1fr);
13
- width: 100%;
34
+ }
35
+
36
+ .grid-sm,
37
+ .grid-sm--fluid {
38
+ grid-template-columns: repeat(
39
+ map.get(configs.$NAPPR_GRID, 'columns-sm'),
40
+ 1fr
41
+ );
14
42
  }
15
43
 
16
44
  .grid {
17
45
  max-width: map.get(configs.$NAPPR_GRID, 'max-width');
18
46
  }
19
47
 
20
- .grid--fluid {
21
- max-width: none;
48
+ .grid-sm {
49
+ max-width: map.get(configs.$NAPPR_GRID, 'max-width-sm');
22
50
  }
23
51
 
24
52
  // ==========================================================
@@ -3,7 +3,7 @@
3
3
  @use '../../core/funcs/map' as map;
4
4
 
5
5
  @for $i from 0 through map.get(configs.$NAPPR_GRID, 'columns') {
6
- .grid--col-offset-#{$i} {
6
+ .grid-col-offset-#{$i} {
7
7
  grid-column-start: #{$i + 1};
8
8
  }
9
9
  }
@@ -11,7 +11,7 @@
11
11
  @each $key, $value in configs.$NAPPR_BREAKPOINTS {
12
12
  @include mixins.media-query-min($key) {
13
13
  @for $i from 0 through map.get(configs.$NAPPR_GRID, 'columns') {
14
- .grid-#{$key}--col-offset-#{$i} {
14
+ .grid-#{$key}-col--offset-#{$i} {
15
15
  grid-column-start: #{$i + 1};
16
16
  }
17
17
  }
@@ -19,7 +19,7 @@
19
19
  }
20
20
 
21
21
  @for $i from 0 through map.get(configs.$NAPPR_GRID, 'columns') {
22
- .grid--col-offset-#{$i}__right {
22
+ .grid-col--offset-#{$i}__right {
23
23
  grid-column-end: #{$i + 1};
24
24
  }
25
25
  }
@@ -27,7 +27,7 @@
27
27
  @each $key, $value in configs.$NAPPR_BREAKPOINTS {
28
28
  @include mixins.media-query-min($key) {
29
29
  @for $i from 0 through map.get(configs.$NAPPR_GRID, 'columns') {
30
- .grid-#{$key}--col-offset-#{$i}__right {
30
+ .grid-#{$key}-col--offset-#{$i}__right {
31
31
  grid-column-end: #{$i + 1};
32
32
  }
33
33
  }
package/sass/main.scss CHANGED
@@ -39,9 +39,9 @@
39
39
 
40
40
  /* 7. 🧩 COMPONENTS (UI Components)
41
41
  /* ========================================================== */
42
- // @use './components/badge/elements' as *;
42
+ @use './components/' as *;
43
43
 
44
- // @use './components/button/' as *;
44
+ // @use './components/badge/elements' as *;
45
45
  // @use './components/scrollbar/' as *;
46
46
 
47
47
  /* ========================================================== */
@@ -3,6 +3,7 @@ html {
3
3
  }
4
4
 
5
5
  body {
6
+ background-color: var(--nappr-theme-background);
6
7
  color: var(--nappr-theme-text-secondary);
7
8
  font-family: var(--nappr-text-font-family);
8
9
  font-size: var(--nappr-text-font-size);
@@ -95,17 +95,33 @@
95
95
  }
96
96
 
97
97
  // ==========================================================
98
- // SIZES
98
+ // Layout
99
99
  // ==========================================================
100
100
 
101
- .is-full-width {
101
+ .is-layout-width {
102
102
  @extend %is-full-width;
103
103
  }
104
104
 
105
- .is-full-height {
105
+ .is-layout-height {
106
106
  @extend %is-full-height;
107
107
  }
108
108
 
109
- .is-full-layout {
109
+ .is-layout {
110
110
  @extend %is-full-layout;
111
111
  }
112
+
113
+ // ==========================================================
114
+ // Viewport
115
+ // ==========================================================
116
+
117
+ .is-viewport-width {
118
+ @extend %is-viewport-width;
119
+ }
120
+
121
+ .is-viewport-height {
122
+ @extend %is-viewport-height;
123
+ }
124
+
125
+ .is-viewport {
126
+ @extend %is-viewport-layout;
127
+ }
@@ -1,5 +1,6 @@
1
1
  @use '../core/placeholders/' as *;
2
2
  @use '../core/funcs/list' as list;
3
+ @use '../core/funcs/map' as map;
3
4
 
4
5
  @each $value in list.steps(1, 12) {
5
6
  .flex-#{$value} {
@@ -79,3 +80,23 @@
79
80
  align-self: $value;
80
81
  }
81
82
  }
83
+
84
+ $gaps-map: list.steps(1, 6);
85
+ $gaps-map: map.mirror($gaps-map);
86
+ $gaps-map: map.merge(
87
+ $gaps-map,
88
+ (
89
+ '0': 0,
90
+ '0-75': 0.75,
91
+ '1': 1,
92
+ '1-5': 1.5,
93
+ '2': 2,
94
+ '2-5': 2.5,
95
+ )
96
+ );
97
+
98
+ @each $key, $value in $gaps-map {
99
+ .gap-#{$key}v {
100
+ gap: #{$value}rem;
101
+ }
102
+ }
@@ -2,8 +2,6 @@
2
2
  // Utility Classes
3
3
  // ==========================================================
4
4
  .clearfix {
5
- *zoom: 1;
6
-
7
5
  &::after,
8
6
  &::before {
9
7
  content: '.';
@@ -3,9 +3,15 @@
3
3
  // ==========================================================
4
4
  // Placeholders
5
5
  // ==========================================================
6
+ %scroll-smooth-mobile {
7
+ -webkit-overflow-scrolling: touch; /* Smooth scrolling sur iOS */
8
+ overscroll-behavior: contain; /* Empêche le scroll bounce sur iOS */
9
+ }
10
+
6
11
  %is-scrollbox {
7
12
  @extend %is-full-layout;
8
13
  @extend %position-absolute;
14
+ @extend %scroll-smooth-mobile;
9
15
 
10
16
  overflow: auto;
11
17
  }
@@ -13,15 +19,20 @@
13
19
  %is-scrollbox-y {
14
20
  @extend %is-full-layout;
15
21
  @extend %position-absolute;
22
+ @extend %scroll-smooth-mobile;
16
23
 
17
24
  overflow: hidden auto;
18
25
  }
19
26
 
20
27
  %scroll-x-auto {
28
+ @extend %scroll-smooth-mobile;
29
+
21
30
  overflow: auto hidden;
22
31
  }
23
32
 
24
33
  %scroll-y-auto {
34
+ @extend %scroll-smooth-mobile;
35
+
25
36
  overflow: hidden auto;
26
37
  }
27
38