CSS-Prepare
view release on metacpan or search on metacpan
lib/CSS/Prepare/Property/Values.pm view on Meta::CPAN
)
}x;
our $positive_length_value = qr{
(?:
$positive_number_value
(?: px | em | ex | in | cm | mm | pt | pc )
|
0
)
}x;
my $percentage_value = qr{ $number_value % }x;
our $positive_percentage_value = qr{ $positive_number_value % }x;
our $colour_value = qr{
(?:
aqua | black | blue | fuchsia | gray | green
| lime | maroon | navy | olive | orange | purple
| red | silver | teal | white | yellow
|
\# [0-9a-fA-F]{6}
|
\# [0-9a-fA-F]{3}
|
rgb\(
(?:
(?: (?: $number_value | $percentage_value ) , \s* ){2}
(?: $number_value | $percentage_value )
)
\)
)
}x;
our $string_value = qr{
(?:
\' (?: \\ \' | [^'] )* \' # single-quoted
| # or
\" (?: \\ \" | [^"] )* \" # double-quoted
)
}x;
our $url_value = qr{
url \( \s*
(?:
$string_value \s* \) # either a string
|
[^'"\)] .*? # or text not including a right paren
(?<! \\ ) \) # (unless it is escaped)
)
}x;
my $media_types = qr{
(?:
all | braille | embossed | handheld | print
| projection | screen | speech | tty | tv
)
}x;
our $media_types_value = qr{
$media_types
(?: \, \s* $media_types )*
}x;
# descriptive value types
our $background_attachment_value = qr{ (?: scroll | fixed | inherit ) }x;
our $background_colour_value
= qr{ (?: transparent | inherit | $colour_value ) }x;
our $background_image_value = qr{ (?: none | inherit | $url_value ) }x;
our $background_repeat_value
= qr{ (?: repeat | repeat-x | repeat-y | no-repeat | inherit ) }x;
my $background_positions_horizontal
= qr{ (?: left | center | centre | right ) }x;
my $background_positions_vertical
= qr{ (?: top | center | centre | bottom ) }x;
our $background_position_value = qr{
(?:
(?:
(?:
$percentage_value
| $length_value
| $background_positions_horizontal
)
(?:
\s+
(?:
$percentage_value
| $length_value
| $background_positions_vertical
)
)?
)
|
(?:
$background_positions_horizontal \s+
$background_positions_vertical
)
|
(?:
$background_positions_vertical \s+
$background_positions_horizontal
)
|
(?: $background_positions_vertical )
|
inherit
)
}x;
my $border_collapse_value = qr{ (?: collapse | separate | inherit ) }x;
our $border_colour_value = qr{ (?: transparent | inherit | $colour_value ) }x;
our $individual_border_radius_value
= qr{ (?: $positive_length_value | $positive_percentage_value ) }x;
our $border_radius_corner_value = qr{
$individual_border_radius_value
(?: \s+ $individual_border_radius_value )?
}x;
our $border_radius_value = qr{
$individual_border_radius_value
(?: \s+ $individual_border_radius_value ){0,3}
(?:
\s* / \s*
$individual_border_radius_value
(?: \s+ $individual_border_radius_value ){0,3}
)?
}x;
my $border_spacing_value = qr{
(?:
$length_value
| $length_value \s+ $length_value
| inherit
)
}x;
our $border_style_value = qr{
(?:
dashed | dotted | double | groove | hidden
| inset | outset | ridge | solid
| none | inherit
)
}x;
our $border_width_value
= qr{ (?: thin | medium | thick | $positive_length_value | inherit ) }x;
my $caption_side_value = qr{ (?: top | bottom | inherit ) }x;
my $clear_value = qr{ (?: left | right | both | none | inherit ) }x;
my $shape_value = qr{
(?:
rect \( \s*
(?: $length_value | auto )
(?: \s* \, \s* (?: $length_value | auto ) ){3}
\s* \)
)
}x;
my $clip_value = qr{ (?: $shape_value | auto | inherit ) }x;
my $content_repeatable = qr{
(?:
open-quote | close-quote | no-open-quote | no-close-quote
| attr \( $identifier_value \)
| $string_value | $url_value | $identifier_value
)
}x;
my $content_value = qr{
(?:
normal | none | inherit
| $content_repeatable
| (?:
$content_repeatable
(?: \s+ $content_repeatable )+
)
)
( run in 1.708 second using v1.01-cache-2.11-cpan-39bf76dae61 )