class Mint::StyleBuilder

Overview

This class is responsible to build the CSS of "style" tags by resolving nested nested at queries and selectors, handling cases of the same rules in different places.

Defined in:

style_builder.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(css_prefix : String | Nil = nil, optimize : Bool = false) #

[View source]

Instance Method Detail

def any?(node : Ast::Node) #

[View source]
def any?(node : Nil) #

[View source]

[View source]
def compile #

Compiles the processed data into a CSS style sheet.


[View source]
def compile_style(node : Ast::Style, compiler : Compiler) #

[View source]

[View source]
def name_pool : Mint::NamePool(String, Nil) #

[View source]
def prefixed_class_name(node : Ast::Style, id : String | Nil = nil) #

[View source]
def process(node : Ast::CssSelector, id : String | Nil, at : String | Nil, parents : Array(String), conditions : Array(String), style_node : Ast::Node) #

Processes a Ast::CssSelector


[View source]
def process(node : Ast::CssNestedAt, id : String | Nil, at : String | Nil, selectors : Array(String), conditions : Array(String), style_node : Ast::Node) #

Processes an Ast::CssNestedAt


[View source]
def process(body : Array(Ast::Node), id : String | Nil, at : String | Nil, selectors : Array(String), conditions : Array(String), style_node : Ast::Node) #

Processes the body of a CSS Ast::Node.


[View source]
def process(node : Ast::Style, id : String | Nil = nil) #

The main entry point for processing a "style" tag.


[View source]
def property_pool : Mint::NamePool(String, String) #

[View source]

[View source]
def style_pool : Mint::StylePool #

[View source]
def variable_name(name, selector) #

[View source]
def variables : Hash(Mint::Ast::Node, Hash(String, Array(Mint::Ast::Node | String))) #

[View source]