Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • CSS Tutorial
  • CSS Exercises
  • CSS Interview Questions
  • CSS Selectors
  • CSS Properties
  • CSS Functions
  • CSS Examples
  • CSS Cheat Sheet
  • CSS Templates
  • CSS Frameworks
  • Bootstrap
  • Tailwind
  • CSS Formatter
Open In App
Next Article:
SASS | Map Functions
Next article icon

SASS | Map Functions

Last Updated : 11 May, 2020
Comments
Improve
Suggest changes
Like Article
Like
Report
The SASS Map data-type is used to display one or more key-value pairs. Along with the map functions shown in the below lists, you can also use any of the SASS list functions with maps as well. The following lists contains all map functions in SASS:
  1. map-has-key($map, $key) function: This function returns a Boolean value that checks whether the given map contains the given key or not.
    • Example: CSS
            map-has-key(("red": #ff0000, "yellow": #ffff00), blue)        
    • Output:
      false
  2. map-merge($map1, $map2) function: This function returns a map containing $map2 joined to the end of $map1.
    • Example: CSS
            map-merge(("red": #ff0000, "yellow": #ffff00), ("blue": #0000ff)        
    • Output:
      ("red": #ff0000, "yellow": #ffff00, "blue": #0000ff)
  3. map-keys($map) function: This function returns the list of the keys in the given map.
    • Example: CSS
            map-keys(("red": #ff0000, "yellow": #ffff00))        
    • Output:
      ("red", "yellow")
  4. map-remove($map, $keys) function: This function returns a map without the given keys.
    • Example: CSS
            map-remove(("red": #ff0000, "yellow": #ffff00), "red")        
    • Output:
      ("yellow": #ffff00)
  5. map-values($map) function: This function returns the list of the values in the given map.
    • Example: CSS
            map-values(("red": #ff0000, "yellow": #ffff00))        
    • Output:
      (#ff0000, #ffff00)
  6. map-get($map, $key) function: This function returns the value associated with the given key.
    • Example: CSS
            map-get(("blue": #0000ff, "yellow": #ffff00), "blue")        
    • Output:
      #0000ff

Next Article
SASS | Map Functions

S

Slash_IT
Improve
Article Tags :
  • Web Technologies
  • CSS
  • SASS

Similar Reads

    SASS | List Functions
    The SASS list functions are used to modify new lists. The lists need to be created inside circular brackets in order to differentiate from others. SASS list can not be changed hence in some cases new lists are created.Just like the string functions, SASS lists are one-based (not zero-based) indexed
    3 min read
    SASS | Numeric Functions
    Just like the SASS string functions, SASS gives a simple set of functions for changing the numeric values, and these values work the way you'd like them to. Note that one can give CSS value descriptors such as "px" or "rem" to every function except "percentage()". In that case, SASS will ignore the
    2 min read
    Sass @function Rule
    Functions can define complex operations on SassScript values that can be reused throughout the stylesheet. It makes it easier to abstract out the common formulas and behaviors in some readable way. Functions can be defined using @function at-rule. Syntax: html @function <function name>(<arg
    2 min read
    SASS | Color Functions
    Color Components: Before we move to the SASS color functions, let's make sure we know the elements of color that they change. The simple color theory divides any color into three basic components: hue, saturation, and value. HUE (also called "local color") is generally the color that we talk about.
    6 min read
    SASS | String Functions
    SASS string functions are quite similar to the string functions of any other programming language with only a single difference i.e. the SASS strings use 1 based indexing. It means the first character of the SASS string is stored at index 1 (not 0).We have created a table that contains the list of a
    2 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences