🥒
Dill's Knowledge Base
  • Hello World
  • 💻SQL
    • ❌Error Handling
    • 🧀Parameter Sniffing
      • Indexes
      • Query Hints
      • RECOMPILE
      • Branching
      • Memory Grants
      • Summary
      • Bonus
    • SQL Server Buffer Pool
  • 🖱️MongoDB
    • Instructor Led Training
      • DF100
      • DF200
      • DF300
      • DF400
    • MongoDB DBA University
      • DBA Admin Tools
      • DBA Basics
      • Metrics & Monitoring
  • 💻Web Design
    • Oxygen Tips
    • Bricks Builder
      • Tips
      • Discovery Call
      • Utility vs Custom Classes
      • Math Functions
      • Static vs Relative Units
  • Azure
    • AZ-900
      • Benefit of Cloud Computing
      • CapEx, OpEx and Consumption-based
      • Differences Between Cloud Service Categories
      • Identify The Right Service Type
      • Differences Between Types of Cloud Computing
      • Reliability and Predictability
      • Regions and Region Pairs
      • Availability Zones
      • Resource Groups
      • Subscriptions
      • Management Groups
      • Azure Resource Manager
      • Azure ARC
      • Resources Required for VM
      • Benefits and Usage of Core Compute Resources
      • Benefits and Usage of Core Network Resources
      • Public/Private Endpoints
      • Benefits and Usage of Storage Accounts
      • Benefits and Usage of Database Resources
      • Data Movement and Migration Options
      • Benefits and Usage of IoT Services
      • Benefits and Usage of Big Data and Analytics Services
      • Benefits and Usage of AI Services
      • Benefits and Usage of Serverless Technologies
      • Benefits and Usage of DevOps Technologies
      • Functionality of Azure Management Solutions
      • Functionality and Usage of Azure Advisor
      • Functionality and Usage of ARM Templates
      • Functionality and Usage of Azure Monitor
      • Functionality and Usage of Azure Service Health
      • Functionality of Microsoft Defender for Cloud
      • Functionality and Usage of Key Vault
      • Functionality and Usage of Microsoft Sentinel
      • Azure Dedicated Host
      • Defense in Depth
      • Describe the Concept of Zero Trust
      • Functionality and Usage of NSGs
      • Functionality and Usage of Azure Firewall
      • Functionality and Usage of Azure DDoS Protection
      • Explain Authentication and Authorization
      • Functionality and Usage of Azure AD
      • Microsoft Entra Overview
      • Functionality of Conditional Access, MFA and SSO
      • Functionality and Usage of RBAC
      • Functionality and Usage of Resource Locks
      • Functionality and Usage of Tags
      • Functionality and Usage of Azure Policy
      • Governance Hierarchy Constructs
      • Azure Blueprints
      • Describe Microsoft Privacy Statement, OST and DPA
      • Purpose of Trust Center and Azure Compliance Documentation
      • Purpose of Azure Sovereign Regions
      • Factors That Affect Costs
      • Factors to Reduce Cost
      • Functionality and Usage of Azure Cost Management
      • Purpose of Service Level Agreements
    • DP-900
      • Study Cram
    • DP-300
      • Deploy IaaS Soluton with Azure SQL
  • 📦Kubernetes
    • Udemy: Kubernetes for Beginners
Powered by GitBook
On this page
  1. Web Design
  2. Bricks Builder

Math Functions

Source: https://www.youtube.com/watch?v=xy9FEdic4vw

PreviousUtility vs Custom ClassesNextStatic vs Relative Units

Last updated 1 year ago

Clamp()

  • REMs are great, but as you move down from desktop -> mobile.. you don't need all of that padding space

    • In-experienced people will edit each breakpoint

  • Sets a minimum, maximum, and preferred range and scales fluidly between them

    • ex. clamp(min,preferred,max)

      • clamp(5rem, 3.125vw + 4rem, 10rem)

        • What is the preferred value?

  • Great for padding, headings, text, etc

Min()

  • Selects the minimum calculated value

  • Behaves as if you're setting a maximum value

  • Supports mixed units

  • Supports nested calculations as a value

  • Accepts two or three values, but most commonly two values

  • When to use: "I need this element to be sized dynamically, but it should never get larger than X value"

  • min(1366px, 100vw - 12rem)

    • On desktop, the content is max 1366 pixels

      • On mobile, it then selects the lesser of the two values so it takes the VW - 12rem

Max()

  • When to use: "I need this element to be sized dynamically, but it should never get smaller than X value"

Calc()

  • Perform basic or advanced math calculations

  • Supports mixed units

  • Is supported within color functions

  • Is insanely helpful when using variables

  • Is critical for creating "unbreakable" situations

  • Ex. Calc(100vh - 6rem)

    • Maybe you are making a hero page and you want to show the visitor 60 pixels of your next section to entice them to scroll down

    • The reason you do not use 94vh is because that value will adjust depending on the device

💻
https://geary.co/clamp-calculator/