How can I import a single font-awesome icon? - sass

I am attempting to import fa-carot-down, but I don't want to import the whole library. I need a single icon, but I'm not sure how to include it.
I'm using Webpack and SASS, if that makes any difference.
Alternatively, any means to get a carot icon for my dropdown would be appreciated.

You can try IcoMoon and Fontello as it helps you create your own library of fonts.
Furthur you can bundle it together with webpack to import the necessary icons
Now svg's are supported in IcoMoon

Related

How would I make a dark mode toggle with Github fast pages?

I recently started using github fast pages for a school project. I decided I wanted to implement dark mode into my website and after some research was able to implement it pretty easily:
https://srcb.in/FxkcahIMIU - dark-mode.scss file
To implement it into the theme of the Jekyll website, all I had to do was import it:
/*----- ADD YOUR STYLES BELOW -------*/
#import "minima/dark-mode";
into custom-styles.scss
The full file paths for these are _sass/minima/dark-mode.scss, _sass/minima.custom-styles.scss.
While the dark mode works fine, I want to make it possible to toggle dark mode on and off with a switch. Creating this on another website wouldn't be an issue, as I can just use javascript to toggle elements. However, since dark mode is implemented through an import statement in a separate file. I'm not sure how I'd go about this. Is there a way I can use javascript to toggle the import statement? Or maybe create a new import when its switched back to light mode? Thanks in advance!

Argon design not rendering in laravel. How to extract it from node modules using mix?

I have installed argon design system using npm. And inside the head tag, I have added links from the documentation. But I want to extract it from node modules using mix. And run in webpack so that it renders styles. Please, someone, help with a detailed answer.
import the argon js file (in bootstrap.js for example if you're using the default laravel boilerplate) after popper, jquery and bootstrap:
require("argon-design-system-free/assets/js/argon-design-system");
and the css file (in app.scss if you're using it):
#import "~argon-design-system-free/assets/css/argon-design-system.css";
if you want the nucleo icons import then before the css file:
#import "~argon-design-system-free/assets/css/nucleo-icons.css";

How to do a simple import of a style in Preact as you would do in React?

In React, in order to style a component, I simply import the style file that sits in the same directory as the component, e.g., import './style.scss'. It's simple and easy, no problems there.
However, I can't seem to make this work in Preact. The style file just never get applied, even after following the docs and of course installing node-sass and sass-loader. I see plenty of examples out there using CSS modules and a few with CSS in JS, but I'd like to do a bog-standard import if possible.
Thanks in advance for any help you can provide.
Apparently the solution was to disable CSS modules altogether by installing css-loader and adding the following to my preact.config.js:
const css = helpers.getLoadersByName(config, 'css-loader')[0];
css.loader.options.modules = false;

Reple.it - How can I import css and javascript with relative path

enter image description here
This doesn't work. I can't import css, js and images.
Someone could help me.
Just use html/css/javascript template.
Relative path works there.

Xcode can't import PDF asset

Since Xcode6 can use vector assets, our designer starts to export PDF format assets instead of PNG. this's very very convenience but I found that I can't import PDF through "import action" by right click, see the PDF files is unavailable state with gray color:
And I can import it by dragging it directly.
Is there anything I am wrong?
Please check the following link, it might be of help : http://martiancraft.com/blog/2014/09/vector-images-xcode6/

Resources