@fishawack/lab-env 4.45.0-beta.1 → 4.45.0-beta.3

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.
package/_Ai/sass-@.md ADDED
@@ -0,0 +1,350 @@
1
+ ---
2
+ applyTo: "**/*.scss"
3
+ ---
4
+
5
+ # SCSS/SASS Development Instructions for GitHub Copilot
6
+
7
+ ## Project Overview
8
+
9
+ This project follows a structured SCSS/SASS architecture built on top of `@fishawack/lab-ui`, a proprietary utility-first CSS framework similar to Tailwind CSS. The architecture enforces separation of concerns where styles are kept entirely outside of component files (Vue, React, etc.). All styling is managed through a structured SASS directory system that promotes reusability, maintainability, and fast compilation times.
10
+
11
+ The build system uses Dart SASS with custom bundling that automatically combines files and implements PurgeCSS for production optimization. The architecture prioritizes component-based styling with a clear separation between vendor libraries, project-specific components, and variable overrides.
12
+
13
+ ## Folder Structure
14
+
15
+ ```
16
+ resources/sass/
17
+ ├── _variables.scss # Project-specific variable overrides
18
+ ├── _defaults.scss # Lab-UI component setting overrides
19
+ ├── general.scss # Project component imports (fast-reloading)
20
+ ├── vendor.scss # Third-party library imports (cached)
21
+ └── components/ # Project-specific component styles
22
+ ├── _component-name.scss # Individual component files
23
+ ├── _utilities.scss # Project-specific utility extensions
24
+ └── ... # Additional components as needed
25
+ ```
26
+
27
+ > resources/sass is specific to laravel projects, in wordpress, static sites and other frameworks the sass folder is usually in \_Build/sass but it may vary
28
+
29
+ ### File Organization Rules
30
+
31
+ - **`_variables.scss`**: Hard-coded project variables that override lab-ui defaults
32
+ - **`_defaults.scss`**: Component-specific setting overrides for lab-ui components
33
+ - **`general.scss`**: Imports all project-defined components (recompiles frequently)
34
+ - **`vendor.scss`**: Imports external libraries and lab-ui base (cached for performance)
35
+ - **`components/`**: Individual component files using underscore prefix naming convention
36
+
37
+ ## Libraries and Frameworks
38
+
39
+ ### Primary Framework: @fishawack/lab-ui
40
+
41
+ - **Version**: Latest
42
+ - **Documentation**: https://lab-ui.fishawack.solutions/
43
+ - **Purpose**: Provides grid system, utility classes, and base components
44
+ - **Import Pattern**: `@import "@fishawack/lab-ui/_[component].scss";`
45
+
46
+ ### Key Lab-UI Components Available:
47
+
48
+ - `_variables.scss` - Base color palette and spacing variables
49
+ - `_defaults.scss` - Component default settings
50
+ - `_typography.scss` - Text styling and font configuration
51
+ - `_grid.scss` - Flexbox-based 12-column grid system
52
+ - `_button.scss` - Button component base
53
+ - `_form.scss` - Form component base
54
+ - `_utilities.scss` - Utility classes (Tailwind-like system)
55
+ - `_flex.scss` - Flexbox utilities
56
+ - `_card.scss` - Card layout component
57
+ - `_icon.scss` - Icon sizing and styling
58
+ - `_modal.scss` - Modal dialog component
59
+ - `_alert.scss` - Alert/notification component
60
+ - Additional components available as needed (breadcrumb, pagination, progress, etc.)
61
+
62
+ ### Utility System
63
+
64
+ Lab-UI provides a comprehensive utility class system similar to Tailwind CSS with some differences:
65
+
66
+ #### Responsive Breakpoints:
67
+
68
+ - `mobile:` - 767px and below
69
+ - `tablet:` - 1023px and below
70
+ - `desktop:` - 1299px and below
71
+
72
+ #### Spacing Scale:
73
+
74
+ - `-0`: 0
75
+ - `-0.5`: $spacing \* 0.5 (8px)
76
+ - ``: $spacing (16px)
77
+ - `-1.5`: $spacing \* 1.5 (24px)
78
+ - `-2`: $spacing \* 2 (32px)
79
+ - `-3`: $spacing \* 3 (48px)
80
+ - `-4`: $spacing \* 4 (64px)
81
+
82
+ #### Color Classes:
83
+
84
+ - Background: `bg-0` through `bg-6` (uses $color0-$color6)
85
+ - Text: `color-1` through `color-6` (uses $color1-$color6)
86
+ - Border: `border-color-1` through `border-color-6`
87
+
88
+ #### Grid System:
89
+
90
+ - Default max-width: 1400px
91
+ - 12-column factor system
92
+ - Classes: `grid__1/12` through `grid__12/12`
93
+ - Responsive: `mobile:grid__12/12`, `tablet:grid__6/12`
94
+ - Gutters: `grid--gutters`, `grid--gutters-x`, `grid--gutters-y`
95
+ - Gutter sizes: `-0`, `-0.5`, ``, `-1.5`, `-2`, `-3`, `-4`
96
+
97
+ #### Flexbox Utilities:
98
+
99
+ - `flex`, `inline-flex`
100
+ - `justify-start`, `justify-center`, `justify-between`, `justify-around`, `justify-evenly`
101
+ - `items-start`, `items-center`, `items-end`, `items-baseline`, `items-stretch`
102
+ - `flex-row`, `flex-column`, `flex-wrap`, `flex-no-wrap`
103
+ - `flex-grow-1` through `flex-grow-12`
104
+ - `order-1` through `order-12`
105
+
106
+ #### Display & Visibility:
107
+
108
+ - `block`, `inline-block`, `inline`, `hidden`
109
+ - `visible`, `invisible`
110
+ - Responsive: `mobile:hidden`, `tablet:block`
111
+
112
+ #### Typography:
113
+
114
+ - `text-left`, `text-center`, `text-right`
115
+ - `font-100` through `font-900`
116
+ - `italic`, `not-italic`
117
+ - `uppercase`, `lowercase`, `capitalize`, `normal-case`
118
+ - `underline`, `line-through`, `no-underline`
119
+
120
+ Full documentation: https://lab-ui.fishawack.solutions/#Utilities
121
+
122
+ ### Build System
123
+
124
+ - **Compiler**: Dart SASS
125
+ - **PurgeCSS**: Enabled for production builds only
126
+ - **File Watching**: `general.scss` recompiles faster than `vendor.scss`
127
+ - **Output**: Combined CSS file with automatic optimization
128
+
129
+ ## Coding Standards
130
+
131
+ ### File Naming Conventions
132
+
133
+ - Component files: `_component-name.scss` (underscore prefix, kebab-case)
134
+ - Partials: Always use underscore prefix for imported files
135
+ - Main files: `general.scss`, `vendor.scss` (no underscore, not imported elsewhere)
136
+
137
+ ### Import Structure
138
+
139
+ ```scss
140
+ // 1. Always import variables first
141
+ @import "_variables.scss";
142
+
143
+ // 2. Import defaults second (for lab-ui overrides)
144
+ @import "_defaults.scss";
145
+
146
+ // 3. Import specific lab-ui components in vendor.scss
147
+ @import "@fishawack/lab-ui/_typography.scss";
148
+ @import "@fishawack/lab-ui/_grid.scss";
149
+ @import "@fishawack/lab-ui/_button.scss";
150
+
151
+ // 4. Import project components in general.scss
152
+ @import "./components/_utilities.scss";
153
+ @import "./components/_button.scss";
154
+ ```
155
+
156
+ ### Variable System
157
+
158
+ #### Lab-UI Default Colors (Base Framework):
159
+
160
+ ```scss
161
+ $color0: white; // White
162
+ $color1: #22f0cc; // Light Blue
163
+ $color2: #19b398; // Darker Light Blue
164
+ $color3: #ff9d2e; // Orange
165
+ $color4: #333333; // Dark Gray
166
+ $color5: #f2f2f2; // Light Gray
167
+ $color6: #e6e6e6; // Medium Gray
168
+
169
+ $colorGood: #dff0d8; // Green
170
+ $colorInfo: #d9edf7; // Blue
171
+ $colorWarn: #fcf8e3; // Yellow
172
+ $colorBad: #f2dede; // Red
173
+ ```
174
+
175
+ #### Project Color Override Pattern:
176
+
177
+ ```scss
178
+ // Override lab-ui defaults in _variables.scss
179
+ $color1: #your-primary; // Primary brand color
180
+ $color2: #your-secondary; // Secondary brand color
181
+ $color3: #your-accent; // Accent color
182
+ // ... continue as needed
183
+
184
+ // Define additional project colors beyond lab-ui defaults
185
+ $color7: #custom-color;
186
+ $color8: #another-color;
187
+ // ... as many as needed
188
+
189
+ // Create semantic aliases for better readability
190
+ $colorPrimary: $color1;
191
+ $colorSuccess: $color9; // If using additional colors
192
+ $colorWarning: $color10;
193
+ $colorError: $color11;
194
+
195
+ // Component-specific overrides in _defaults.scss
196
+ $fontColor: $color4;
197
+ $fontFamily: "Your-Font-Family";
198
+ $formBorder: $color6;
199
+ $formBorder--active: $color1;
200
+ ```
201
+
202
+ ### Component Architecture
203
+
204
+ - Use BEM methodology: `.component__element--modifier`
205
+ - Keep components small and focused on single responsibility
206
+ - Leverage lab-ui utilities instead of custom CSS when possible
207
+ - Override lab-ui components through variable redefinition, not direct CSS
208
+
209
+ ### PurgeCSS Considerations
210
+
211
+ ```scss
212
+ /* purgecss start ignore */
213
+ // Styles that are added via JavaScript
214
+ .dynamic-class {
215
+ // This will be preserved in production
216
+ }
217
+ /* purgecss end ignore */
218
+ ```
219
+
220
+ **Important**: PurgeCSS only runs on production builds, not development. Always test production builds when using JavaScript-generated classes.
221
+
222
+ ## UI Guidelines
223
+
224
+ ### Design System Integration
225
+
226
+ - **Primary Colors**: Use the defined `$color1-$color6` variables consistently
227
+ - **Typography**: Rely on lab-ui typography classes and custom font family
228
+ - **Spacing**: Use lab-ui spacing scale (`$spacing` based increments)
229
+ - **Grid System**: Utilize lab-ui's flexbox grid for layouts
230
+ - **Responsive Design**: Mobile-first approach with lab-ui breakpoints
231
+
232
+ ### Component Development Patterns
233
+
234
+ #### Custom Button Extensions (Example):
235
+
236
+ ```scss
237
+ .button {
238
+ // Extend lab-ui button component
239
+ color: $fontColor;
240
+ border: 2px solid $color1;
241
+
242
+ &:hover,
243
+ &:focus,
244
+ &:active {
245
+ background-color: $color1;
246
+ color: $color0;
247
+ }
248
+
249
+ // Custom button variants
250
+ &--secondary {
251
+ border-color: $color2;
252
+ color: $color2;
253
+
254
+ &:hover {
255
+ background-color: $color2;
256
+ }
257
+ }
258
+ }
259
+ ```
260
+
261
+ #### Form Component Extensions (Example):
262
+
263
+ ```scss
264
+ .form__group {
265
+ // Extend lab-ui form patterns
266
+
267
+ &--active input {
268
+ box-shadow: inset 0 0 0px 2px $formBorder--active;
269
+ }
270
+
271
+ &--error {
272
+ color: $colorBad;
273
+
274
+ input {
275
+ box-shadow: inset 0 0 0px 2px $colorBad;
276
+ color: $colorBad;
277
+ }
278
+ }
279
+
280
+ &--disabled input {
281
+ opacity: 0.5;
282
+ pointer-events: none;
283
+ }
284
+ }
285
+ ```
286
+
287
+ #### Custom Utility Extensions (Example):
288
+
289
+ ```scss
290
+ // Background pattern utilities
291
+ .bg-pattern-1 {
292
+ background-image: url("path/to/pattern.svg");
293
+ background-position: center;
294
+ background-repeat: no-repeat;
295
+ background-size: cover;
296
+ }
297
+
298
+ // Gradient utilities
299
+ .bg-gradient-primary {
300
+ background: linear-gradient(135deg, $color1 0%, $color2 100%);
301
+ }
302
+
303
+ // Custom spacing utilities beyond lab-ui defaults
304
+ .spacing-custom {
305
+ margin: $spacing * 2.5; // Custom spacing multiplier
306
+ }
307
+ ```
308
+
309
+ ### Performance Optimization
310
+
311
+ - **File Separation**: Keep project styles in `general.scss` for fast recompilation
312
+ - **Vendor Caching**: Import stable external libraries in `vendor.scss`
313
+ - **Utility-First**: Prefer lab-ui utilities over custom CSS when possible
314
+ - **Component Scope**: Keep component files focused and lightweight
315
+
316
+ ### Component Framework Integration
317
+
318
+ - **No Scoped Styles**: Never use `<style scoped>` in component files
319
+ - **No Inline Styles**: Avoid `<style>` blocks in component files entirely
320
+ - **Class-Based**: Use CSS classes exclusively for styling
321
+ - **Global Scope**: All styles are global and managed through the SASS architecture
322
+ - **Component Naming**: Use BEM methodology for component-specific styles that extend beyond utility classes
323
+
324
+ ### Browser Support & Fallbacks
325
+
326
+ - Lab-ui includes legacy fallbacks for older browsers
327
+ - **Grid fallback**: Uses inline-block as fallback (requires no whitespace between grid containers)
328
+ - **Flexbox**: Progressive enhancement with fallbacks
329
+ - **CSS Calc**: Enhanced where supported with fallbacks
330
+ - **Modernizr integration**: Feature detection for `flexbox`, `csscalc`, `cssanimations`
331
+ - Grid containers must have no whitespace between them for inline-block fallback to work properly
332
+
333
+ ### Development Workflow
334
+
335
+ 1. **Define Brand Variables**: Set project colors and overrides in `_variables.scss` first
336
+ 2. **Configure Component Defaults**: Override lab-ui component settings in `_defaults.scss` if needed
337
+ 3. **Create Component Styles**: Build component-specific styles in `components/` directory
338
+ 4. **Import in General**: Add new components to `general.scss` for fast recompilation
339
+ 5. **Test Development Build**: Verify styles work correctly (PurgeCSS disabled)
340
+ 6. **Validate Production Build**: Test with production build (PurgeCSS enabled)
341
+ 7. **Check for Purged Classes**: Ensure JavaScript-generated classes haven't been removed
342
+
343
+ ### Project Customization Guidelines
344
+
345
+ - Always start with lab-ui utilities before creating custom CSS
346
+ - Override lab-ui variables rather than writing new component CSS when possible
347
+ - Create semantic color aliases for better maintainability
348
+ - Use BEM methodology for project-specific components
349
+ - Keep component files focused and lightweight
350
+ - Leverage the vendor/general split for optimal build performance