logo
down
shadow

SCSS variables - same name, different value in different media breakpoints


SCSS variables - same name, different value in different media breakpoints

By : user2953307
Date : November 20 2020, 01:01 AM
I hope this helps you . Ruby Sass is correct. Your value should be 0.
LibSass has a tendency to behind in features and behavior. It is emulating the behavior of Sass 3.3, which freely has access to global variables from within mixins/functions. There isn't a way to do this that will work with both Sass 3.4 and LibSass. The syntax you need to use to be able to access global variables is not backwards compatible.
code :
@mixin resolution($breakpointName) { 

    @if ($breakpointName == 'mobile') {
        @media (min-width: 320px) and (max-width: 520px) {   
            $pad: 20px !global;

            @content; 
        }
    }
    @else {
        @media (min-width: 521px) {   
            $pad: 30px !global;

            @content; 
        }            
    }
}


Share : facebook icon twitter icon
compass (scss) variables & media queries

compass (scss) variables & media queries


By : kavin pandian
Date : March 29 2020, 07:55 AM
I wish did fix the issue. I'm trying to do something like this: , As an alternative, try using the power of em's:
code :
$arrow-size: 1.875em; // 30px, use pxtoem.com for conversion

div.selector {
  height: 0px; width: 0px;
  position: absolute;
  bottom: 0px; left: 50%;
  border-bottom: $arrow-size solid white;
  border-left: $arrow-size solid transparent;
  border-right: $arrow-size solid transparent;
}

@media only screen and (max-width: 449px) {
  div.selector { font-size: 50%; }
}
Compiling SCSS to CSS Compile error due to PHP Variables in SCSS file. How to get past it?

Compiling SCSS to CSS Compile error due to PHP Variables in SCSS file. How to get past it?


By : Victor
Date : March 29 2020, 07:55 AM
I wish did fix the issue. You can't. Sass is a Ruby tool, not PHP.
Edit: according the source code, $widgetbackground is defined in the colors.scss file.
How to change breakpoints in the scss in vuetify v2?

How to change breakpoints in the scss in vuetify v2?


By : user3054088
Date : March 29 2020, 07:55 AM
I hope this helps you . For version 2.0 you have to change the SASS variables by creating a custom SASS file which you import into your vue.config.js file: https://vuetifyjs.com/en/customization/sass-variables.
For the SASS variables to be available globally, you can to first
code :
// src/sass/main.scss
@import '~vuetify/src/styles/styles.sass';

// You need to map-merge your new SASS variables
$grid-breakpoints: map-merge($grid-breakpoints, (
  xs: 0,
  sm: 476px,
  md: 668px,
  lg: 1000px,
  xl: 1300px
))
// vue.config.js

module.exports = {
  css: {
    loaderOptions: {
      sass: {
        data: `@import "~@/sass/main.scss"`,
      },
    },
  },
}
//import this into your main.js
import Vue from 'vue'
import Vuetify from 'vuetify/lib'

export default new Vuetify({
  breakpoint: {
    thresholds: {
       xs: 0,
       sm: 476,
       md: 668,
       lg: 1000,
       xl: 1300
    }
  }
})
Using media breakpoints in Bootstrap 4 / SASS - _breakpoints.scss does not know $grid-breakpoints

Using media breakpoints in Bootstrap 4 / SASS - _breakpoints.scss does not know $grid-breakpoints


By : Ameen Hks
Date : March 29 2020, 07:55 AM
seems to work fine Did you include the bootstrap variables.scss ? Seems like the variables are missing
How to do breakpoints in scss file with vuetify?

How to do breakpoints in scss file with vuetify?


By : Bailo
Date : March 29 2020, 07:55 AM
This might help you How to use media query breakpoints in my vuetify application but in scss file? , You can do it in scss:
code :
@import '~vuetify/src/styles/settings/_variables';

@media #{map-get($display-breakpoints, 'sm-and-down')} {
.custom-class {
    display: block;
}
Related Posts Related Posts :
  • CSS Media Queries not kicking in when there supposed to
  • Video JS - poster image cover/contain
  • center the div absolute using css but i cannot figure out why its not moving to centre
  • simple css code, i dont understand
  • Autoformatting LESS code with vim
  • Can we use different CSS language/pre processors for different components in a Angular Project
  • combined multiple classes into one css rule
  • Detect mobile device browsers, not only screen width
  • CSS folded corners of div with shadow
  • bootstrap 3: why do my <div>s stack from 992 px width onwards when using "col-sm-6"
  • IE7, IE8 support for css3 media query
  • Gradient ends are blurry when using pixel measurements
  • display bootstrap popovers outside divs with overflow:hidden
  • How to make a non responsive site by using Bootstrap?
  • Selecting an element that doesn't have a child with a certain class
  • Embedded Twitter Widget Height issue
  • Twitter Bootstrap - How to get buttons to be block level only on extra small and small devices
  • How can I add a vertical scrollbar to my div automatically?
  • Trouble changing the link font color using typography.js in gatsby
  • Nesting up scss with main.scss and subcomponent scss files
  • Why does my FontSquirrel font not work?
  • Div positioning (overlays when not wanted)
  • Align button vertically in alert field
  • CSS: display: flex and text ellipsis on the same element
  • Fixed position buttons appearing in incorrect area depending on browser
  • CSS-menu issue in angular project
  • Responsive Website - general enquiries
  • Webkit Scrollbar Buttons only showing horizontal
  • explicitly set a field's width in css to "no-auto"
  • Jekyll accessing page variables from CSS
  • Why did my #wrapDesktopNavBar disappear on desktop view?
  • CSS Menu Multiple Hover Colo(u)rs
  • Line-height works differently on Mac and Windows
  • Resizing an image at will with CSS?
  • CSS Naming Best Practice in MVC Layouts
  • FireFox & Chrome CSS Differs
  • Gradient Border Causing the Border to Disappear
  • How to hide column label on google chart
  • How to change H3 color in bootstrap using CSS file
  • CSS How to align checkbox image
  • css3 jagged edge on left isntead of right
  • display text in a horizontal line , using ng-repeat and bootstrap
  • Css right top corner
  • Bootstrap keep button other border gradient when removing border-left
  • Getting divs in the right postion
  • Rails 4: Sass raises SyntaxError when precompiling assets on server but not on development computer
  • Boostrap css file overrode my css file
  • Why are placeholder selectors inside @keyframes valid .scss?
  • Create a 4x4 responsive grid of squares with a margin of 20px on each side of the container?
  • CSS Not Selector: Select All Except Inside of Element
  • CSS Intellisense for files not in solution
  • Overlapping Anchor Tags When Hovering Over One
  • Any way to keep Susy from changing font-size automatically?
  • In Chrome’s user agent stylesheet, why use "-webkit-margin-before" et al instead of just "margin-top"
  • Responsive slanted border
  • How to create overlay over div without defining it in HTML
  • Using negative values fails the execution in SASS
  • up/down arrow key issue with typeahead control (angular bootstrap UI)
  • increase size of search terms in a magento site by applying css class-name
  • Inline elements not collapsing whitespace before the end of the tag, in modern browsers?
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org