-
node-sass package has been depricated – try using sass
If you’ve been using SASS, you need to know that you should not use npm node-sass package from now on. It might still work if you use it, but there might be errors, problems and vulnerabilities if you’re using it now. The alternative for now should be the sass package instead. I’ve already created a…
-
How to install and get started with SASS in CSS project
First of all open up your front-end project folder and create the basic files inside it like index.html and style.css files. Assuming that you’ve setup the package.json file already, next, open up the terminal and type in the following command to install SASS as a developer dependency : In the next step, it’ll be good…
-
The text inside button breaks into multiple lines. How to fix this – CSS
Say you have a button like so: When you try to run it, the text splits into two lines, especially while using smaller screens. To fix this you can do this :
-
How to create moving text animation from right to left using CSS animation
Here’s how you can create a moving text animation using HTML and CSS using @keyframes keyword :
-
Important CSS Flexbox properties commonly used
Here are some of the most commonly used CSS flexbox properties you should know about : Some very useful flexbox wrapping properties are also given below. Flexbox ‘wrapping’ is used when flexbox items overflow from the flex container :
-
How to center divs exactly in the middle of the screen?
Here’s how it’s done using HTML and CSS. These are the basic codes to center the divs using CSS and you can further build up your own style from here. Notice that we’ve used height: 100vh which is 100 percent of the viewport height so that we can precisely center the containers vertically. You can…
-
Create a button which displays a pop-up and pop-out window using CSS and JavaScript
We’ll create a button which shows a pop-up and pop-out window when you click on the button. For this we’ll use a JavaScript function which will be linked to the HTML using onClick keyword on the HTML linked to the button. Here’s the code : Next, the code block below, note that the popupWindow() function…
-
Dark Mode Toggle button using HTML, CSS and JavaScript
Here’s a simple way to create a toggle button to switch between light mode and dark mode using HTML, CSS and JavaScript function. In the above CSS code block, we’ve created the default light mode background for the body. We’ve also created another dark-mode class which will be activated dynamically using the JavaScript function. In…
-
A box-shadow template to use anywhere inside your CSS project
Here’s a box-shadow template which you can use in any of your CSS projects : So, the order is just this : Here’s another more complex one with double box shadows which stacks layer on layer to make it look deeper : Try and edit these to experiment anywhere you want on your project.