Class CssResponsiveGenerator
- Namespace
- SunamoCssGenerator
- Assembly
- SunamoCssGenerator.dll
Generates responsive CSS with media queries for common screen resolutions
public class CssResponsiveGenerator : CssGenerator
- Inheritance
-
CssResponsiveGenerator
- Inherited Members
- Extension Methods
Fields
Sizes
List of common screen widths in pixels for responsive breakpoints
public static List<int> Sizes
Field Value
_1024
Screen width breakpoint: 1024px (tablets in landscape mode, small laptops)
public const int _1024 = 1024
Field Value
_10240
Screen width breakpoint: 10240px (10K resolution)
public const int _10240 = 10240
Field Value
_1280
Screen width breakpoint: 1280px (standard laptops, HD resolution)
public const int _1280 = 1280
Field Value
_1366
Screen width breakpoint: 1366px (common laptop resolution)
public const int _1366 = 1366
Field Value
_1440
Screen width breakpoint: 1440px (wide laptop screens)
public const int _1440 = 1440
Field Value
_1536
Screen width breakpoint: 1536px (scaled desktop displays)
public const int _1536 = 1536
Field Value
_15360
Screen width breakpoint: 15360px (16K resolution)
public const int _15360 = 15360
Field Value
_1600
Screen width breakpoint: 1600px (wide desktop displays)
public const int _1600 = 1600
Field Value
_1792
Screen width breakpoint: 1792px (high-resolution displays)
public const int _1792 = 1792
Field Value
_1920
Screen width breakpoint: 1920px (Full HD resolution)
public const int _1920 = 1920
Field Value
_20000
Screen width breakpoint: 20000px (maximum supported resolution)
public const int _20000 = 20000
Field Value
_2048
Screen width breakpoint: 2048px (2K resolution)
public const int _2048 = 2048
Field Value
_2160
Screen width breakpoint: 2160px (ultra-wide displays)
public const int _2160 = 2160
Field Value
_2280
Screen width breakpoint: 2280px (high-resolution mobile displays)
public const int _2280 = 2280
Field Value
_2304
Screen width breakpoint: 2304px (Retina displays)
public const int _2304 = 2304
Field Value
_2436
Screen width breakpoint: 2436px (iPhone X-class displays)
public const int _2436 = 2436
Field Value
_2560
Screen width breakpoint: 2560px (QHD/WQHD resolution)
public const int _2560 = 2560
Field Value
_2732
Screen width breakpoint: 2732px (iPad Pro resolution)
public const int _2732 = 2732
Field Value
_2880
Screen width breakpoint: 2880px (Retina 5K displays)
public const int _2880 = 2880
Field Value
_2960
Screen width breakpoint: 2960px (high-resolution mobile displays)
public const int _2960 = 2960
Field Value
_3200
Screen width breakpoint: 3200px (ultra-high-resolution displays)
public const int _3200 = 3200
Field Value
_3440
Screen width breakpoint: 3440px (ultra-wide QHD displays)
public const int _3440 = 3440
Field Value
_3840
Screen width breakpoint: 3840px (4K UHD resolution)
public const int _3840 = 3840
Field Value
_4096
Screen width breakpoint: 4096px (DCI 4K resolution)
public const int _4096 = 4096
Field Value
_4480
Screen width breakpoint: 4480px (ultra-high-resolution displays)
public const int _4480 = 4480
Field Value
_5120
Screen width breakpoint: 5120px (5K resolution)
public const int _5120 = 5120
Field Value
_6016
Screen width breakpoint: 6016px (Apple Pro Display XDR resolution)
public const int _6016 = 6016
Field Value
_6040
Screen width breakpoint: 6040px (ultra-high-resolution displays)
public const int _6040 = 6040
Field Value
_768
Screen width breakpoint: 768px (tablets in portrait mode)
public const int _768 = 768
Field Value
_7680
Screen width breakpoint: 7680px (8K UHD resolution)
public const int _7680 = 7680
Field Value
_8192
Screen width breakpoint: 8192px (8K Full resolution)
public const int _8192 = 8192
Field Value
Methods
Generate(Dictionary<int, Dictionary<string, int>>)
Generates responsive CSS with media queries for different screen widths. The dictionary maps max-width breakpoints to element names and their widths.
public void Generate(Dictionary<int, Dictionary<string, int>> elementWidthsByMaxWidth)
Parameters
elementWidthsByMaxWidthDictionary<int, Dictionary<string, int>>Dictionary where key is max-width breakpoint and value is a dictionary of element names to their widths
ToString()
Returns the generated responsive CSS as a string
public override string ToString()
Returns
- string
The generated CSS code