eva-css-fluid 1.0.1

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.
@@ -0,0 +1,128 @@
1
+ // _gradients.scss
2
+ // Système ultra-moderne pour les gradients - Emmet-style only!
3
+ // Contrôle complet des couleurs et angles via variables CSS
4
+
5
+ @use "colors" as colors;
6
+
7
+ // Conteneur pour toutes les variables de gradient
8
+ .all-grads {
9
+ --current-angle: 90deg; // Angle pour le système dynamique
10
+ --current-from-color: var(--brand); // Couleur de départ dynamique
11
+ --current-to-color: var(--accent); // Couleur d'arrivée dynamique
12
+ }
13
+
14
+ // =============================================================================
15
+ // APPLICATEURS MODERNES : Classes Emmet-style pour les gradients
16
+ // =============================================================================
17
+
18
+ .grad-linear {
19
+ background: linear-gradient(var(--current-angle), var(--current-from-color) 0%, var(--current-to-color) 100%);
20
+ }
21
+
22
+ .grad-radial {
23
+ background: radial-gradient(circle at center, var(--current-from-color) 0%, var(--current-to-color) 100%);
24
+ }
25
+
26
+ .grad-linear-text {
27
+ background: linear-gradient(var(--current-angle), var(--current-from-color) 0%, var(--current-to-color) 100%);
28
+ -webkit-background-clip: text;
29
+ -webkit-text-fill-color: transparent;
30
+ background-clip: text;
31
+ }
32
+
33
+ .grad-radial-text {
34
+ background: radial-gradient(circle at center, var(--current-from-color) 0%, var(--current-to-color) 100%);
35
+ -webkit-background-clip: text;
36
+ -webkit-text-fill-color: transparent;
37
+ background-clip: text;
38
+ }
39
+
40
+ .grad-linear-border {
41
+ border-image: linear-gradient(var(--current-angle), var(--current-from-color) 0%, var(--current-to-color) 100%) 1;
42
+ }
43
+
44
+ .grad-radial-border {
45
+ border-image: radial-gradient(circle at center, var(--current-from-color) 0%, var(--current-to-color) 100%) 1;
46
+ }
47
+
48
+ // =============================================================================
49
+ // EMMET-STYLE COULEURS : Version ultra-compacte
50
+ // =============================================================================
51
+
52
+ // Emmet-style color setters
53
+ @each $color in colors.$gradients {
54
+ @each $variation in colors.$all-variations {
55
+ $color-name: if($variation == "", $color, "#{$color}#{$variation}");
56
+
57
+ .from-#{$color-name} {
58
+ --current-from-color: var(--#{$color-name});
59
+ }
60
+
61
+ .to-#{$color-name} {
62
+ --current-to-color: var(--#{$color-name});
63
+ }
64
+ }
65
+ }
66
+
67
+ // Emmet-style couleurs spéciales
68
+ .from-transparent { --current-from-color: transparent; }
69
+ .to-transparent { --current-to-color: transparent; }
70
+
71
+ // =============================================================================
72
+ // EMMET-STYLE ANGLES : Contrôle ultra-compact
73
+ // =============================================================================
74
+
75
+ // Emmet-style direction modificateurs
76
+ .d-t { --current-angle: to top !important; }
77
+ .d-b { --current-angle: to bottom !important; }
78
+ .d-l { --current-angle: to left !important; }
79
+ .d-r { --current-angle: to right !important; }
80
+ .d-tl { --current-angle: to top left !important; }
81
+ .d-tr { --current-angle: to top right !important; }
82
+ .d-bl { --current-angle: to bottom left !important; }
83
+ .d-br { --current-angle: to bottom right !important; }
84
+
85
+ // Emmet-style angle modificateurs (génération automatique)
86
+ @for $i from 0 through 72 {
87
+ $angle: $i * 5;
88
+ .a-#{$angle} { --current-angle: #{$angle}deg !important; }
89
+ }
90
+
91
+ // =============================================================================
92
+ // EMMET-STYLE BACKGROUND ZOOM : Contrôle ultra-compact du background-size
93
+ // =============================================================================
94
+
95
+ // Background zoom classes - style Emmet
96
+ .bg-size { background-size: 150% 150%; }
97
+ .bg-size_ { background-size: 200% 200%; }
98
+ .bg-size__ { background-size: 300% 300%; }
99
+
100
+
101
+
102
+ // Background position pour les zooms
103
+ .bg-center { background-position: center; }
104
+ .bg-top { background-position: top; }
105
+ .bg-bottom { background-position: bottom; }
106
+ .bg-left { background-position: left; }
107
+ .bg-right { background-position: right; }
108
+
109
+ // =============================================================================
110
+ // EFFETS ET ANIMATIONS MODERNES
111
+ // =============================================================================
112
+
113
+ // Animations ultra-compactes
114
+ .animated { animation: gradient-shift 3s ease infinite; }
115
+ .animated-slow { animation: gradient-shift 6s ease infinite; }
116
+ .animated-fast { animation: gradient-shift 1s ease infinite; }
117
+
118
+
119
+
120
+ // =============================================================================
121
+ // KEYFRAMES pour les animations
122
+ // =============================================================================
123
+
124
+ @keyframes gradient-shift {
125
+ 0% { background-position: 0% 50%; }
126
+ 50% { background-position: 100% 50%; }
127
+ 100% { background-position: 0% 50%; }
128
+ }
package/src/_grid.scss ADDED
@@ -0,0 +1,137 @@
1
+ // Fonction strip-unit pour retirer les unités des valeurs Sass
2
+ @use 'sass:math';
3
+ @use 'sass:meta';
4
+
5
+ @function strip-unit($number) {
6
+ @if meta.type-of($number) == 'number' and not math.is-unitless($number) {
7
+ @return math.div($number, ($number * 0 + 1));
8
+ }
9
+ @return $number;
10
+ }
11
+
12
+ // Configuration
13
+ $sizes: 4, 8, 12, 16, 24, 32, 48, 64, 96, 128 !default;
14
+ $sizing-class: "__", "_", "", "-" !default;
15
+
16
+ .grid {
17
+ display: grid;
18
+ width: 100%;
19
+ }
20
+
21
+ [class*=auto-fit] {
22
+ grid-template-columns: repeat(auto-fit, minmax(var(--current-minmax), 1fr));
23
+ }
24
+
25
+ // Variable de taille minimale pour les grilles
26
+ $grid-min-size: 100 !default;
27
+
28
+ // Génération automatique des classes auto-fit basée sur $sizes
29
+ @each $size in $sizes {
30
+ @if $size >= $grid-min-size {
31
+ @each $class in $sizing-class {
32
+ .auto-fit-#{$size}#{$class} {
33
+ --current-minmax: var(--#{$size}#{$class});
34
+ }
35
+ }
36
+ }
37
+ }
38
+
39
+ // ==========================================
40
+ // SYSTÈME DE GRID CLASSIQUE EN FLEXBOX
41
+ // ==========================================
42
+
43
+ :root {
44
+ --grid-columns: 12; // Variable CSS principale (fallback)
45
+ --col-min-width: 200px; // Largeur minimale d'une colonne
46
+ --col-min-width-unitless: #{strip-unit(200px)}; // Version sans unité pour les calculs CSS
47
+ --current-gap: 1rem; // Gap par défaut entre les colonnes
48
+ }
49
+
50
+ // Container queries pour calcul automatique du nombre de colonnes
51
+ .container\:flex-grid {
52
+ display: flex;
53
+ flex-wrap: wrap;
54
+ width: 100%;
55
+ gap: var(--current-gap);
56
+ container-type: inline-size; // Active les container queries
57
+
58
+ // Calcul automatique basé sur la largeur du conteneur
59
+ // Plus le conteneur est large, plus on a de colonnes
60
+ @container (min-width: 200px) { --grid-columns: 1; }
61
+ @container (min-width: 400px) { --grid-columns: 2; }
62
+ @container (min-width: 600px) { --grid-columns: 3; }
63
+ @container (min-width: 800px) { --grid-columns: 4; }
64
+ @container (min-width: 1000px) { --grid-columns: 5; }
65
+ @container (min-width: 1200px) { --grid-columns: 6; }
66
+ @container (min-width: 1400px) { --grid-columns: 8; }
67
+ @container (min-width: 1600px) { --grid-columns: 10; }
68
+ @container (min-width: 1800px) { --grid-columns: 12; }
69
+ @container (min-width: 2000px) { --grid-columns: 16; }
70
+ }
71
+
72
+ .flex-grid {
73
+ display: flex;
74
+ flex-wrap: wrap;
75
+ width: 100%;
76
+ gap: var(--current-gap);
77
+ }
78
+
79
+
80
+ // Système de colonnes avec calcul CSS dynamique
81
+ $max-columns: 12; // Nombre maximum de colonnes à générer
82
+ $breakpoints: (
83
+ "xs": 200px,
84
+ "sm": 500px,
85
+ "md": 700px,
86
+ "lg": 1000px,
87
+ "xl": 1200px,
88
+ "xxl": 1400px
89
+ );
90
+
91
+ // Génération des classes col-X avec calcul CSS dynamique
92
+ @for $i from 1 through $max-columns {
93
+ .col-#{$i} {
94
+ --col-span: #{$i};
95
+ flex: 0 0 auto;
96
+ width: min(calc(var(--col-span) / var(--grid-columns) * 100% - (var(--grid-columns) / var(--col-span) - 1) * var(--current-gap) / (var(--grid-columns) / var(--col-span))), 100%);
97
+ }
98
+ }
99
+
100
+ // Génération des classes avec notation fraction col-1/Y
101
+ @for $denominator from 1 through $max-columns {
102
+ .col-1\/#{$denominator} {
103
+ --col-fraction: calc(var(--grid-columns) / #{$denominator});
104
+ flex: 0 0 auto;
105
+ // Utilise --grid-columns dans le calcul pour être adaptable
106
+ width: min(calc(var(--col-fraction) / var(--grid-columns) * 100% - (var(--grid-columns) / var(--col-fraction) - 1) * var(--current-gap) / (var(--grid-columns) / var(--col-fraction))), 100%);
107
+ }
108
+ }
109
+
110
+ // ==========================================
111
+ // CLASSES POUR SETTER LOCALEMENT --grid-columns
112
+ // ==========================================
113
+
114
+ // Génération des classes max-col-X pour définir le nombre de colonnes localement
115
+ @for $i from 1 through $max-columns {
116
+ .max-col-#{$i} {
117
+ --grid-columns: #{$i};
118
+ }
119
+ }
120
+
121
+
122
+ // ==========================================
123
+ // CLASSES RESPONSIVES POUR MAX-COLUMNS
124
+ // ==========================================
125
+
126
+ // Génération des classes responsives pour max-col avec breakpoints
127
+ @each $breakpoint-name, $breakpoint-value in $breakpoints {
128
+ @media (max-width: #{$breakpoint-value}) {
129
+ @for $i from 1 through $max-columns {
130
+ .#{$breakpoint-name}\:max-col-#{$i} {
131
+ --grid-columns: #{$i};
132
+ }
133
+ }
134
+ }
135
+ }
136
+
137
+
@@ -0,0 +1,83 @@
1
+ /* stylelint-disable property-no-vendor-suffix */
2
+
3
+ /* Box sizing rules */
4
+ *,
5
+ *::before,
6
+ *::after {
7
+ box-sizing: border-box;
8
+ }
9
+
10
+ /* Prevent font size inflation */
11
+ html {
12
+ -moz-text-size-adjust: none;
13
+ -webkit-text-size-adjust: none;
14
+ text-size-adjust: none;
15
+ }
16
+
17
+ /* Remove default margin in favour of better control in authored CSS */
18
+ body,
19
+ h1,
20
+ h2,
21
+ h3,
22
+ h4,
23
+ p,
24
+ figure,
25
+ blockquote,
26
+ dl,
27
+ dd {
28
+ margin-block-end: 0;
29
+ }
30
+
31
+ /* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
32
+ ul[role="list"],
33
+ ol[role="list"] {
34
+ list-style: none;
35
+ }
36
+
37
+ /* Set core body defaults */
38
+ body {
39
+ min-height: 100vh;
40
+ line-height: 1.5;
41
+ }
42
+
43
+ /* Set shorter line heights on headings and interactive elements */
44
+ h1,
45
+ h2,
46
+ h3,
47
+ h4,
48
+ button,
49
+ input,
50
+ label {
51
+ line-height: 1.1;
52
+ }
53
+
54
+ /* A elements that don't have a class get default styles */
55
+ a:not([class]) {
56
+ color: currentcolor;
57
+ text-decoration-skip-ink: auto;
58
+ }
59
+
60
+ /* Make images easier to work with */
61
+ img,
62
+ picture {
63
+ display: block;
64
+ max-width: 100%;
65
+ }
66
+
67
+ /* Inherit fonts for inputs and buttons */
68
+ input,
69
+ button,
70
+ textarea,
71
+ select {
72
+ font: inherit;
73
+ }
74
+
75
+ /* Make sure textAreas without a rows attribute are not tiny */
76
+ textarea:not([rows]) {
77
+ min-height: 3rem;
78
+ }
79
+
80
+ /* Anything that has been anchored to should have extra scroll margin */
81
+ :target {
82
+ scroll-margin-block: 5ex;
83
+ }
@@ -0,0 +1,99 @@
1
+ .theme-eva {
2
+ // brand - oklch(81.16% 0.1924 75.18);
3
+
4
+ --brand-lightness: 80%;
5
+ --brand-chroma: 0.1924;
6
+ --brand-hue: 169;
7
+
8
+ --accent-lightness: 80%;
9
+ --accent-chroma: 0.1924;
10
+ --accent-hue: 10;
11
+
12
+ --extra-lightness: 80%;
13
+ --extra-chroma: 0.1924;
14
+ --extra-hue: 200;
15
+
16
+
17
+ --current-lightness: 96.4%;
18
+ --current-darkness: 6.4%;
19
+
20
+
21
+ --dark-lightness: var(--current-darkness);
22
+ --dark-chroma: 0.05;
23
+ --dark-hue: var(--brand-hue);
24
+
25
+ --light-lightness: var(--current-lightness);
26
+ --light-chroma: 0.01;
27
+ --light-hue: var(--brand-hue);
28
+
29
+ }
30
+
31
+ .theme-ghost {
32
+
33
+ --brand-lightness: 50%;
34
+ --brand-chroma: 0;
35
+ --brand-hue: 0.1;
36
+
37
+ --accent-lightness: 50%;
38
+ --accent-chroma: 0;
39
+ --accent-hue: 0;
40
+
41
+ --extra-lightness: 50%;
42
+ --extra-chroma: 0;
43
+ --extra-hue: 0;
44
+
45
+ --current-lightness: 80%;
46
+ --current-darkness: 20%;
47
+
48
+
49
+ --dark-lightness: var(--current-darkness);
50
+ --dark-chroma: 0;
51
+ --dark-hue: var(--brand-hue);
52
+
53
+ --light-lightness: var(--current-lightness);
54
+ --light-chroma: 0;
55
+ --light-hue: var(--brand-hue);
56
+
57
+
58
+ }
59
+
60
+ // proxy class for UI elements
61
+ ._bg-app {
62
+ --current-bg-color: var(--bg-color);
63
+ --current-f-color: var(--bg-color-2);
64
+ }
65
+
66
+ ._shadow {
67
+ box-shadow: 4px 4px 0px 0px var(--current-sh-color);
68
+ &_ {
69
+ box-shadow: 8px 8px 0px 0px var(--current-sh-color);
70
+ }
71
+ }
72
+
73
+ // hovers
74
+
75
+ .hover\:_c-brand:hover {
76
+ color: var(--brand);
77
+ }
78
+
79
+ .hover\:_bg-brand__:hover {
80
+ background: var(--brand__);
81
+ }
82
+ .hover\:_bg-dark___:hover {
83
+ background: var(--dark___);
84
+ }
85
+
86
+ [class*="hover\:_bg"] {
87
+ transition: background-color 0.2s;
88
+ }
89
+
90
+ // acticve
91
+
92
+ .active.active\:_bg-brand__ {
93
+ background: var(--brand__);
94
+ }
95
+
96
+
97
+ .active.active\:_c-brand {
98
+ color: var(--brand);
99
+ }
@@ -0,0 +1,114 @@
1
+
2
+ .pointer{
3
+ cursor: pointer;
4
+ }
5
+
6
+ .poa {
7
+ position: absolute;
8
+ &.center {
9
+ left: 50%;
10
+ top: 50%;
11
+ translate: -50% -50%;
12
+ }
13
+ }
14
+ .por {
15
+ position: relative;
16
+ }
17
+ .pof {
18
+ position: fixed;
19
+ }
20
+
21
+ .pos {
22
+ position: sticky;
23
+ top: 101px;
24
+ }
25
+
26
+ .ar-1 {
27
+ aspect-ratio: 1/1;
28
+ }
29
+
30
+ .tac {
31
+ text-align: center;
32
+ }
33
+
34
+ .circle {
35
+ border-radius: 100%;
36
+ }
37
+
38
+ pre {
39
+ white-space: pre-line !important;
40
+ }
41
+
42
+ .mt-auto{
43
+ margin-top: auto;
44
+ }
45
+
46
+ .mb-auto{
47
+ margin-bottom: auto;
48
+ }
49
+
50
+ .mr-auto{
51
+ margin-right: auto;
52
+ }
53
+
54
+ .ml-auto{
55
+ margin-left: auto;
56
+ }
57
+
58
+ .border {
59
+ border-style: solid;
60
+ &.thin {
61
+ border-width: 1px;
62
+ }
63
+ }
64
+
65
+ .oh {
66
+ overflow: hidden;
67
+ }
68
+
69
+ .lt {
70
+ letter-spacing: 0.1em;
71
+ }
72
+
73
+ .lh-0 {
74
+ line-height: 0;
75
+ }
76
+
77
+ .lh-1 {
78
+ line-height: 1;
79
+ }
80
+
81
+ img {
82
+ object-fit: cover;
83
+ }
84
+
85
+ .ttu {
86
+ text-transform: uppercase;
87
+ }
88
+
89
+ .hide {
90
+ display: none !important;
91
+ }
92
+
93
+ .bold {
94
+ font-weight: bold;
95
+ }
96
+
97
+ .blur {
98
+ filter: blur(1rem);
99
+ &_ {
100
+ filter: blur(2rem);
101
+ &_ {
102
+ filter: blur(3rem);
103
+ }
104
+ }
105
+ }
106
+
107
+ .w-full{
108
+ width: 100%;
109
+ }
110
+
111
+
112
+ .h-full{
113
+ height: 100%;
114
+ }
package/src/index.scss ADDED
@@ -0,0 +1,60 @@
1
+ // ===========================================
2
+ // EVA CSS FRAMEWORK - Main Entry Point
3
+ // ===========================================
4
+ // Fluid design framework with OKLCH colors
5
+ // Transform static designs into responsive fluid systems
6
+ // ===========================================
7
+
8
+ // Configuration variables with default values
9
+ // These can be overridden using @use with custom values
10
+ $sizes: 4, 8, 12, 16, 24, 32, 48, 64, 96, 128 !default;
11
+ $font-sizes: 12, 14, 16, 18, 20, 24, 32, 48 !default;
12
+ $build-class: true !default;
13
+ $px-rem-suffix: false !default;
14
+ $name-by-size: true !default;
15
+ $custom-class: false !default;
16
+
17
+ // ===========================================
18
+ // CORE FRAMEWORK MODULES
19
+ // ===========================================
20
+
21
+ // Import and configure all modules
22
+
23
+ // Core fluid scaling system and variable generation
24
+ @use '_eva' with (
25
+ $sizes: $sizes,
26
+ $font-sizes: $font-sizes,
27
+ $build-class: $build-class,
28
+ $px-rem-suffix: $px-rem-suffix,
29
+ $name-by-size: $name-by-size,
30
+ $custom-class: $custom-class
31
+ );
32
+
33
+ // OKLCH color system with opacity/brightness modifiers
34
+ @use '_colors';
35
+
36
+ // Modern gradient system with Emmet-style syntax
37
+ @use '_gradients';
38
+
39
+ // Theme switching and dark/light mode
40
+ @use '_theme';
41
+
42
+ // CSS reset and base styles
43
+ @use '_reset';
44
+
45
+ // Typography and font utilities
46
+ @use '_font';
47
+
48
+ // Flexbox utilities
49
+ @use '_flex';
50
+
51
+ // Grid utilities with configuration
52
+ @use '_grid' with (
53
+ $sizes: $sizes
54
+ );
55
+
56
+ // Component utilities
57
+ // @use '_components';
58
+
59
+ // General utility classes
60
+ @use '_utils';