xiaohongshu
xiaohongshu
css-sass
Use Sass/SCSS for advanced CSS preprocessing with modern @use/@forward syntax
Full skill instructions
Master Sass/SCSS preprocessing with modern @use/@forward syntax, mixins, functions, and modular architecture.
This skill provides atomic, focused guidance on Sass/SCSS with current dart-sass syntax and migration patterns from deprecated @import.
| Property | Value |
|---|---|
| Category | Preprocessing |
| Complexity | Intermediate to Advanced |
| Dependencies | css-fundamentals, css-architecture |
| Bonded Agent | 05-css-preprocessors |
Skill("css-sass")
parameters:
feature:
type: string
required: true
enum: [variables, mixins, functions, nesting, modules, extends]
description: Sass feature to explore
syntax:
type: string
required: false
default: scss
enum: [scss, sass]
description: Sass syntax format
modern_syntax:
type: boolean
required: false
default: true
description: Use @use/@forward instead of deprecated @import
validation:
- rule: feature_required
message: "feature parameter is required"
- rule: valid_feature
message: "feature must be one of: variables, mixins, functions, nesting, modules, extends"
retry_config:
max_attempts: 3
backoff_type: exponential
initial_delay_ms: 1000
max_delay_ms: 10000
logging:
entry_point: skill_invoked
exit_point: skill_completed
metrics:
- invocation_count
- feature_usage
- modern_syntax_adoption
// _variables.scss
$primary-color: #3b82f6 !default;
$spacing-unit: 8px !default;
// _mixins.scss
@use 'variables' as vars;
@mixin button-base {
padding: vars.$spacing-unit * 2;
background: vars.$primary-color;
}
// main.scss
@use 'variables' as v;
@use 'mixins' as m;
.button {
@include m.button-base;
color: v.$primary-color;
}
// abstracts/_index.scss
@forward 'variables';
@forward 'mixins';
@forward 'functions';
// main.scss
@use 'abstracts';
.element {
color: abstracts.$primary-color;
}
// Responsive breakpoints
@mixin respond-to($breakpoint) {
@if $breakpoint == 'sm' {
@media (min-width: 640px) { @content; }
} @else if $breakpoint == 'md' {
@media (min-width: 768px) { @content; }
} @else if $breakpoint == 'lg' {
@media (min-width: 1024px) { @content; }
}
}
// Flexbox center
@mixin flex-center {
display: flex;
justify-content: center;
align-items: center;
}
// Typography scale
@mixin text-style($size, $weight: 400) {
font-size: $size;
font-weight: $weight;
line-height: 1.5;
}
// Rem conversion
@function rem($pixels, $base: 16) {
@return #{$pixels / $base}rem;
}
// Color manipulation
@function tint($color, $percentage) {
@return mix(white, $color, $percentage);
}
@function shade($color, $percentage) {
@return mix(black, $color, $percentage);
}
/* OLD (deprecated) */
@import 'variables';
@import 'mixins';
.button {
color: $primary-color;
@include button-base;
}
/* NEW (recommended) */
@use 'variables' as v;
@use 'mixins' as m;
.button {
color: v.$primary-color;
@include m.button-base;
}
scss/
├── abstracts/
│ ├── _index.scss # @forward all
│ ├── _variables.scss
│ ├── _mixins.scss
│ └── _functions.scss
├── base/
│ ├── _index.scss
│ ├── _reset.scss
│ └── _typography.scss
├── components/
│ ├── _index.scss
│ ├── _button.scss
│ └── _card.scss
├── layouts/
│ ├── _index.scss
│ └── _grid.scss
└── main.scss
describe('CSS Sass Skill', () => {
test('validates feature parameter', () => {
expect(() => skill({ feature: 'invalid' }))
.toThrow('feature must be one of: variables, mixins...');
});
test('returns @use syntax when modern_syntax is true', () => {
const result = skill({ feature: 'modules', modern_syntax: true });
expect(result).toContain('@use');
expect(result).not.toContain('@import');
});
test('includes namespace examples for modules', () => {
const result = skill({ feature: 'modules' });
expect(result).toContain('as');
});
});
| Error Code | Cause | Recovery |
|---|---|---|
| INVALID_FEATURE | Unknown feature | Show valid options |
| DEPRECATED_SYNTAX | Using @import | Show @use migration |
| NAMESPACE_CONFLICT | Duplicate namespace | Suggest unique alias |
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience