Class CssGenerator
- Namespace
- SunamoCssGenerator
- Assembly
- SunamoCssGenerator.dll
Generates CSS code with proper indentation and formatting
public class CssGenerator
- Inheritance
-
CssGenerator
- Derived
- Inherited Members
- Extension Methods
Methods
AddClass(int, string, params CssProperty[])
Adds a CSS class selector with properties
public void AddClass(int tabCount, string name, params CssProperty[] cssProps)
Parameters
tabCountintNumber of tabs for indentation
namestringClass name without the . prefix
cssPropsCssProperty[]CSS properties to apply
AddId(int, string, params CssProperty[])
Adds a CSS ID selector with properties
public void AddId(int tabCount, string name, params CssProperty[] cssProps)
Parameters
tabCountintNumber of tabs for indentation
namestringID name without the # prefix
cssPropsCssProperty[]CSS properties to apply
AddMediaMinMaxWidth(int, int, Func<int, int>)
Adds a media query with min-width and max-width screen constraints
public void AddMediaMinMaxWidth(int tabCount, int maxWidth, Func<int, int> getMinFromMax)
Parameters
tabCountintNumber of tabs for indentation
maxWidthintMaximum width in pixels
getMinFromMaxFunc<int, int>Function to calculate minimum width from maximum width
AddTab(int)
Adds tabs for indentation
public void AddTab(int tabCount)
Parameters
tabCountintNumber of tabs to add
End(int)
Adds a closing brace with proper indentation
public void End(int tabCount)
Parameters
tabCountintNumber of tabs for indentation
ToString()
Returns the generated CSS as a string
public override string ToString()
Returns
- string
The generated CSS code