Maps in SASS / SCSS hold key-value pairs, and it enables users to lookup value with the help of key. Defining it is similar to defining a variable; it starts with $ following which we type the Map name. Within braces, we add key: value pairs. For example:
This is a typical example that depicts Maps. In order to change the font weight of an element, we have defined font weights and within it, we have multiple key-value pairs which can be called in order to apply respective font weights to the text elements of the HTML. Kindly observe the syntax on declaring the variable and various key-value pairs which can be extended to any use cases for your project.
Try experimenting with font-family, define variables and add several key-value pairs for each text element such as paragraphs, heading 1, heading 2 and so on. Now that we have defined the maps, the next step is to call maps so that the respective CSS property applies to the text elements.
Calling Maps in your files
It’s easy to leverage SASS Maps by calling the map-get(variable, value) function. In place of the variable, we can add here font-weight and the corresponding value will automatically suggest based on the key-value name we define in the variable.
In the next tutorial, we will be learning variables in SASS. You’ll learn how to create a variable in SASS/SCSS, how to use it for referencing, and the best practices while using variables in SASS.
Getting Started with SASS. Learn SASS from this series of tutorials
What is SASS?
SASS is one of the most powerful, stable and professional CSS supersets in the World.
What does SASS means?
Sass fullform is Syntactically Awesome Stylesheet
Sass is an extension to Cascading Style Sheets (CSS)
Sass is a powerful CSS pre-processor
Sass is fully adaptable with all versions of CSS
Sass diminshes css repetition and therefore increases productivity
Sass was developed by Hampton Catlin and developed by Natalie Weizenbaum in 2006
Sass is opensource.
Why Use Sass?
CSS Stylesheets are getting bigger, more complex, and cumbersome to manage. This is why a CSS pre-processor can help in making the CSS stylesheet smaller, less complex and easier to manage, thereby making the life of the designer easy and empowers them to leverage advanced styling concepts in their website and web development projects. Sass is enriched with features that are not presently available in the normal CSS stylesheets. Features like variables, nested rules, mixins, imports, inheritance, built-in functions, and other vital features make SASS one of the most powerful CSS preprocessors in the world.
What you should know before learning SASS?
Before getting started with an SASS preprocessor one should have at least intermediary expertise or exposure in HTML and CSS. Without the knowledge of HTML or CSS, it is not possible to learn SASS and implement it in your projects. So, if you want to learn GTML and CSS you can check out tutorials from W3Schools and learn the basics and intermediate level. Once you have intermediary knowledge in HTML and CSS, you can easily learn SASS from these easy tutorials
Learn the benefits of SASS:
CSS Compatible:
SASS is compatible with all versions of CSS. Compatibility makes programmers integrate with the project seamlessly.
Feature Rich:
SASS is full of unique and problem-solving features which makes it a one-of-a-kind CSS preprocessor in the World.
Most Approved:
SASS is approved globally by several companies and programmers. Many developers use SASS as the standard preprocessor of CSS.
Community:
SASS has enormous community support which includes thousands of developers and thousands of web companies.
Extensions:
SASS has two extension formats
.sass – Older SASS extension and uses indented syntax. After processing, it changes to standard CSS.
.scss – Sassy CSS and is a relatively new extension. All proper CSS stylesheet is also a valid SCSS stylesheet.
How to process SASS
It’s not possible to integrate SASS or SCSS stylesheets directly into the website or web application projects. SASS or SCSS is processed to become a valid CSS file and then integrated into the project. There are several ways to go about processing SASS or SCSS to CSS. We are going to discuss only the free tools/plugins to process SCSS
Desktop Application:
There are several paid desktop applications that help in processing SASS or SCSS to CSS; however, there is one free application that does the job well and is available in all operating systems, i.e., Scout-App. You can install the Scout-App from the following URL.
The easiest way to process SASS or SCSS is to use open source Text Editor – Microsoft Visual Studio Code and use the available Live SASS Compiler and Live Server extensions in the Extension Store. After typing the valid SCSS or SASS styles, you can click the Watch SCSS button in the bottom part of VS Code. Every time, we add a new line of SCSS, the extension processes it and creates equivalent CSS in the .css file that the extension self creates. We can directly add the generated .css file to our web project.
In this tutorial, you’ll learn how to Install Android Studio in Windows 10
Android Studio is an open-source official Integrated Development Environment for Android Operating System. It is built on JetBrains’ IntelliJ IDEA. One can use both Java and Kotlin inside Android Studio to build Android Applications.
Features of Android Studio
1. Android Emulator is in-built in Android Studio.
2. Gradle-based support system, which is a build automation tool.
3. Lint tools for catching performance issues, flags bugs and other critical errors.
4. Wizards to create app templates easily.
5. Layout Editor, which is easy to use, enables developers to create complex layouts easily with easy drag and drop and coding screens.
6. Layouts are easily viewed post creation in run time.
7. Android Wear apps are built quickly with Android Studio.
8. Google Platform with Firebase Cloud Messaging and Google App Engine support.
9. Android Studio is supported in all major Operating Systems such as Windows, Mac and Linux.
We can choose the correct version based on the Windows version. On clicking the link, we need to signup with Oracle. Enter the details, verify the email, and we can download the Java installation file.
2. After downloading, proceed with installation by clicking next.
3. Next, we must add the path in the environmental variable. To open it in Windows 10, Click Start and type Environmental Variables. Please open it and click Environmental Variables. In the top section, click New. Enter Variable name as “JAVA_HOME” and value as C:\Program Files\Java\jdk1.8.0_281
4. Now, we can download the Android Studio from the official website given below.
Is your website contact form spammed by bots? Learn to implement PHP Contact Form with Google Recaptcha.
Hello everyone! By now, you would have gotten irritated with spam coming to your inbox from your contact form. Here is a quick tutorial on avoiding bot spams from your contact form by implementing Google Recaptcha version 2.
Contact form creation
Name
Mobile
Email
Message
In this tutorial, we will guide you on how to create a simple contact form using Bootstrap 5 with the following fields:
We will use the post method. First, we will have to create an HTML file using Bootstrap 5. We can use the Bootstrap 5 started template for designing the contact form using the following link
Create a file contact.html using any of the Text Editors
Paste the started template in the contact.html file.
Create fields based on your design requirement, or you can copy our code for design layouts. Also, embed the g-Recaptcha class in a division just above the submit button.
Enter details and select Recaptcha V2 since Google Recaptcha without checkbox doesn’t serve the purpose.
Copy the Recaptcha site key and paste it inside the Recaptcha Button.
Now copy the secret key and paste it inside the secret key variable.
Include form tag before the start of the field. Name your PHP form, and action tag, call the contact.php file.
If the website user checks the Recaptcha, it will pass various parameters to the Google Recaptcha API. The PHP form will send all details filled in the contact form to the email if API returns success.
Now we have successfully integrated the Recaptcha V2.
By successfully integrating Google Recaptcha V2 on your contact form you can prevent spambots in your website contact form. You can feel free to use this code to create a contact form with Google Recaptcha on your websites. Check the tutorial on Materialize CSS