Property
[Raku CSS Project] / [CSS-Properties Module] / CSS::Properties :: Property
class CSS::Properties::Property
Meta-data for a given property
Synopsis
use CSS::Properties::Property;
my CSS::Properties::Property %edges = <top right bottom left>.map: {
$_ => CSS::Properties::Property.new: :name('margin-' ~ $_);
}
my CSS::Properties::Property $margin-info .= new: :name<margin>, :%edges;
is-deeply $margin-info.name, 'margin', '$prop.name';
say $margin-info.box; # True
say $margin-info.inherit; # False
say $margin-info.synopsis; # <margin-width>{1,4}
say $margin-info.top.name, # margin-top
Description
Information class for individual properties
Methods
new
method new(
Str :$prop-name, # property name e.g. 'margin-top'
CSS::Module :$module = CSS::Module::CSS3.new(),
CSS::Properties::Property :%edges{ :$top, :$left, :$bottom, :$right},
) returns CSS::Properties::Property;
Returns a new object containing inforation on the given property
Accessors
The following CSS::Module::Property accessors are handled by this object
Notes:
[1] for example
margin
has edge-namestop-margin
...left-margin
[2] for example
font
has child-namesfamily-name
,font-weight
...