All Questions
447
questions
0
votes
0
answers
14
views
Extends or Mixins in Sass?
I use scss in my application. I use these rules quite often.
display: flex;
justify-content: center;
align-items: center;
I want to reuse these styles with mixins or extends. I want to understand ...
1
vote
0
answers
17
views
How do I reuse the SCSS mixins from another style file to work with my classes and style them according to their resolutions?
I have a type.scss file that I need to use to reference various stylings for the fonts.
// type.scss
@use 'queries' as *;
$font-rubik: 'Rubik', sans-serif;
$font-inter: 'Inter', sans-serif;
// ...
0
votes
0
answers
35
views
What would I use to replace the css 'property' method so that I can imitate its use in a sass file?
Trying to recreate some css styles in a sass file and I ran across an issue which is making me think that the sass preprocessor is actually less capable then a basic css.
** Edited **
Within the sass ...
0
votes
1
answer
2k
views
Global import and use of mixins file in Angular
is there a way to create global mixins.scss file in src/assets/style/mixins.scss and be able to use it in every component style sheet without importing it all the time?
For the moment I managed to set ...
0
votes
1
answer
343
views
Error: Declarations may only be used within style rules
I declared my @mixin, and it didn't give me any problems, out of nowhere it started giving this error:
@mixin flexbox ($justify-content: center, $align-items: center, $flex-direction: column, $flex-...
1
vote
1
answer
258
views
Live Sass compiler throws an error when processing the mixin
My problem: the live Sass compiler throws an error when processing the mixin:
Compilation Error
Error: 2 arguments required, but only 1 was passed.
╷
8 │ $fontSize: rem(14);
^^^^^^^
Here is the ...
4
votes
1
answer
3k
views
Unable to resolve Mixin error "$color: var(--bs-body-bg) is not a color", that has never occurred before
I ran the "npm run production" command as usual.
But now I keep getting this error and I can't solve it.
I didn't make any changes to assets (css, scss) only in controlers some code ...
-1
votes
1
answer
148
views
what's the difference between including a mixin with () and without () in sass?
I am creating a CSS library and I was using a mixin in my sass code, I was wondering what's the difference between @include btn and @include btn() in the example below? because they have the same ...
0
votes
1
answer
337
views
"Unused CSS selector" when using a SASS themify mixin with Svelte and Vite:
I'm trying to create a small web application using Svelte.
One of the requirements is to be able to change the application "theme" on demand, for example - dark theme, light theme, high ...
-1
votes
2
answers
135
views
Dynamically nest CSS Classes in SASS
I am trying to create dynamically nested classes in SASS. I am using React 18 and SASS 1.62 (Craco).
I have a scss file that needs to look like this
.gridRow.scss
.root {
&.row-cols-auto>* {
...
0
votes
1
answer
91
views
React and bootstrap without importing and embedding into application
We all know how to import Bootstrap into an application (in this case React) but what happens when my React application will be embedded into a website that already has Bootstrap added as an external ...
1
vote
1
answer
250
views
can someone tell me what's the problem with this SASS code?
when entering the vale "xs", i get an error saying "(max-width: 575.98px) isn't a valid CSS value."
and when entering any other value i get the following error "This ...
1
vote
1
answer
827
views
How do I implement the Sass features of Bootstrap 5 with NextJS?
I am working on a NextJS project, and I already have experience using Sass with NextJS. Now I am trying to build a NextJS project with Bootstrap 5. I am able to add the basic Bootstrap functionality ...
0
votes
1
answer
126
views
Capture which li a class is attached to
I am not sure if this is possible, but is there a way for sass to identify which li a particular class is attached to?
If I had:
<ul>
<li></li>
<li></li>
<li ...
0
votes
1
answer
479
views
Use an array of variables in an each mixin
I'm having a hard time trying to figure out how to write an array for a variable to be used in an "each" statement.
$array: (("1", "../../Media/Images/FirstImage.png&...