class Components::CSS::Config

Overview

Configuration for the utility-first CSS system

Defined in:

components/css/config/css_config.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def amber_theme : Components::CSS::Tokens::Theme #

Semantic design-system tokens. The storage name remains as an alpha compatibility detail; use #design_system_theme in new code.


[View source]
def amber_theme=(amber_theme : Components::CSS::Tokens::Theme) #

Semantic design-system tokens. The storage name remains as an alpha compatibility detail; use #design_system_theme in new code.


[View source]
def border_radius : Hash(String, String) #

Border radius values


[View source]
def border_radius=(border_radius : Hash(String, String)) #

Border radius values


[View source]
def colors : Hash(String, String | Hash(String, String)) #

Color palette


[View source]
def colors=(colors : Hash(String, String | Hash(String, String))) #

Color palette


[View source]
def containers : Hash(String, String) #

Container query breakpoints


[View source]
def containers=(containers : Hash(String, String)) #

Container query breakpoints


[View source]
def design_system_theme : Components::CSS::Tokens::Theme #

[View source]
def design_system_theme=(theme : Components::CSS::Tokens::Theme) #

[View source]
def extend : Hash(String, Hash(String, String)) #

Custom extensions


[View source]
def extend=(extend __arg0 : Hash(String, Hash(String, String))) #

Custom extensions


[View source]
def font_sizes : Hash(String, String) #

Font sizes


[View source]
def font_sizes=(font_sizes : Hash(String, String)) #

Font sizes


[View source]
def fonts : Hash(String, String) #

Font families


[View source]
def fonts=(fonts : Hash(String, String)) #

Font families


[View source]
def get_color(name : String) : String | Nil #

Get a color value (handles nested hashes)


[View source]
def letter_spacing : Hash(String, String) #

Letter spacing


[View source]
def letter_spacing=(letter_spacing : Hash(String, String)) #

Letter spacing


[View source]
def line_heights : Hash(String, String) #

Line heights


[View source]
def line_heights=(line_heights : Hash(String, String)) #

Line heights


[View source]
def merge(other : Config) : Config #

Merge with another config


[View source]
def opacity : Hash(String, String) #

Opacity scale


[View source]
def opacity=(opacity : Hash(String, String)) #

Opacity scale


[View source]
def screens : Hash(String, String) #

Breakpoints for responsive design


[View source]
def screens=(screens : Hash(String, String)) #

Breakpoints for responsive design


[View source]
def shadows : Hash(String, String) #

Box shadows


[View source]
def shadows=(shadows : Hash(String, String)) #

Box shadows


[View source]
def spacing : Hash(String, String) #

Spacing scale


[View source]
def spacing=(spacing : Hash(String, String)) #

Spacing scale


[View source]
def to_custom_properties : String #

Generate CSS custom property declarations for all design tokens. Returns a multi-line string of custom property declarations (without the :root {} wrapper -- the caller adds that).


[View source]
def to_dark_custom_properties : String #

[View source]
def transitions : Hash(String, String) #

Transitions


[View source]
def transitions=(transitions : Hash(String, String)) #

Transitions


[View source]
def use_amber_theme(theme : Components::CSS::Tokens::Theme) : self #

[View source]
def use_design_system_theme(theme : Components::CSS::Tokens::Theme) : self #

[View source]
def z_index : Hash(String, String) #

Z-index scale


[View source]
def z_index=(z_index : Hash(String, String)) #

Z-index scale


[View source]