Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

198
Views
Sass Error: Invalid CSS after "...lude animations": expected "}" | Sass dark theme implementation

Recently I want to use sass to implement a dark theme in my ts test project but IDK why I face this issue

Error in plugin "sass"
Message:
    src/Assets/Sass/main.scss
Error: Invalid CSS after "...lude animations": expected "}", was ".theme-change;"
        on line 6 of src/Assets/Sass/main.scss
>>     @include animations.theme-change;

   -------------^

in my main file main.scss i @use my partials and @include @mixin like this:

@use 'colors';
@use 'animations';
@use 'theme';

body {
    @include animations.theme-change;

    &[data-theme='light'] {
        @include theme.mode(colors.$light, colors.$dark);

        @include theme.components(colors.$light, colors.$dark);
    }

    &[data-theme='dark'] {
        @include theme.mode(colors.$dark, colors.$light);

        @include theme.components(colors.$dark, colors.$light);
    }
}

These are my partial
in side all of them there is one or two @mixin only
_animations.scss
_colors.scss
_theme.scss


_theme.scss includes theme styles and components

@mixin mode($theme-bg, $theme-color) {
    background: $theme-bg;
    color: $theme-color;
}

@mixin components($theme-bg, $theme-color) {
    .container {
        width: 100vw;
        height: auto;
    }
}

_colors.scss is just some variables holding theme colors

$light: #fff;
$dark: #232323;

$primary: #FFBD07;
$secondary: #2b2d42;
$tertiary: #edf2f4;
$quaternary: #e5383b;

_animations.scss have just a @mixin

@mixin theme-change {
    transition: color, background cubic-bezier(0.68, -0.55, 0.27, 01.55) 420ms !important;
}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

.sass files are for stylus syntax, use .scss as the extension instead

SCSS example:

.container {
  background-color: #f5f5f5;
}

SASS example:

.container
  background-color: #f5f5f5

as you can see SASS doesnt use braces and semicolons

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!