Posts

Showing posts with the label sass

How to reference npm'd sass files

Image
Clash Royale CLAN TAG #URR8PPP How to reference npm'd sass files If I npm install bootstrap, or npm install neat, how do I reference these in my scss files? Do I have to know the exact path in the npm_modules folder? If I try: @import "neat" or @import "bootstrap" I get an error saying it can't find the path. Is the best way to not even use npm and just download the scss files into a folder and reference it from there? By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Verify that mixin is being called from within a media query

Image
Clash Royale CLAN TAG #URR8PPP Verify that mixin is being called from within a media query I need to do a check in a mixin, to know if it's being called from within a media query. It's possible? @mixin test { @if [is within a media query?] { ... } @else { ... } } @media (min-width: 768px) { @include test; } 1 Answer 1 You could use the @debug (<= 3.3) or @error (>=3.4) to output to the console from within the mixin to check if it has been compiled (this would assume you can isolate the usage of the mixin to this media query for this test). There isn't a way to use @if in Sass as you are asking about. http://sass-lang.com/documentation/file.SASS_REFERENCE.html#error By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your conti...

SCSS: How to not repeat declaration in CSS file?

Image
Clash Royale CLAN TAG #URR8PPP SCSS: How to not repeat declaration in CSS file? So I'm using two separate graphics that use the same options: #basicMob .progress { background: green none repeat scroll 0 0; } #notBasicMob .progress { background: green none repeat scroll 0 0; } How can I declare #basicMob and #notBasicMob, and have .progress affect them both? I keep trying things like: #basicMob, #notBasicMob .progress { background: green none repeat scroll 0 0; } But so far I haven't been able to find what works. Thanks a lot. 2 Answers 2 You can use the & to select your elements as necessary: & .some-class { &.another-class {} } So in your case: #basicMob, #notBasicMob { &.progress { background: green none repeat scroll 0 0; } More information about it can be found here: https://css-tricks.com/the-sass-ampersand/ That ...

Can't get rid of ish'transparent background of image buttons

Image
Clash Royale CLAN TAG #URR8PPP Can't get rid of ish'transparent background of image buttons Picture of the buttons Hello guys. I am trying make the background of the buttons seen in the image-link above go away but can not seem to figure out how. This is my css (sass): .spectrum-cursors display: flex flex-direction: row justify-content: space-around; padding: 0 1em margin-left: auto .button margin-top: rem(8) margin-left: rem(12) margin-bottom: rem(8) display: flex I have tried the background-image: none, border: none, but no results. this is my first time using CSS so I might have missed something fundamental. Every answer will be appreciated. :) That seems like a box-shadow on the containing element of the buttons. But we can't be sure without looking at relevant HTML and CSS. Please create a Minimal, Complete, and Verifiable example. – Nisarg Shah ...

Is there any software that I can add to my Angular built website that takes care of all blog features for me such as search, and embedding?

Image
Clash Royale CLAN TAG #URR8PPP Is there any software that I can add to my Angular built website that takes care of all blog features for me such as search, and embedding? I have a website built in Angular, and I want to add a blog page. Is there any software that takes care of the back end work for me, and allows me to create blogs and allows users to create blogs easily? Wordpress plays well with angular – Matěj Štágl 30 mins ago Is there an easy way to implement it? From what I could see it could only be implemented in websites that were made using Wordpress. – sathvik4142 24 mins ago The point is, when you create own front, you need to create own back. But you can ...