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-names top-margin ... left-margin

  • [2] for example font has child-names family-name, font-weight ...

CSS::Properties v0.8.1

CSS property manipulation library

Authors

  • David Warring

License

Artistic-2.0

Dependencies

CSS::Module:ver<0.5.9+>CSS::Writer:ver<0.2.8+>ColorMethod::Also

Test Dependencies

Provides

  • CSS::Box
  • CSS::Font
  • CSS::Font::Descriptor
  • CSS::Font::Pattern
  • CSS::PageBox
  • CSS::Properties
  • CSS::Properties::Calculator
  • CSS::Properties::Font
  • CSS::Properties::Optimizer
  • CSS::Properties::Property
  • CSS::Units

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.