Implementation of the CSS Preprocessor nth-child handling. More...
Go to the source code of this file.
Namespaces | |
namespace | csspp |
The namespace of all the classes in the CSS Preprocessor. | |
namespace | csspp::anonymous_namespace{nth_child.cpp} |
Variables | |
int const | csspp::anonymous_namespace{nth_child.cpp}::g_shift_a = 0 |
int const | csspp::anonymous_namespace{nth_child.cpp}::g_shift_b = 32 |
The CSS Preprocessor, while verifying a grammar, will check each and every parameter. This includes the syntax of the An+B in a function such as the ':nth-child(...)' one.
The grammar allows for one or two signed integers, the first followed by an 'n' (or 'N' since we are case insensitive). Both of those numbers can be omitted. When an integer is omitted, it defaults to 0.
Spaces can appear anywhere, we just remove them all. In CSS 3, spaces are not allowed between the sign and INTEGER of the first integer, nor between the first integer and the 'n' character.
nth: optionally-signed-integer 'n' signed-integer | optionally-signed-integer 'n' | optionally-signed-integer | 'ODD' | 'EVEN'
optionally-signed-integer: INTEGER | signed-integer
signed-integer: '+' INTEGER | '-' INTEGER
Definition in file nth_child.cpp.
Documentation of CSS Preprocessor.
This document is part of the Snap! Websites Project.
Copyright by Made to Order Software Corp.