View on GitHub

CSS-Properties-raku

CSS property-list manipulation library

[Raku CSS Project] / [CSS-Properties] / CSS::Units

utility definitions and operators for handing CSS Units

Synposis

use CSS::Units :ops, :pt, :px, :in, :mm;
my $css = (require CSS::Properties).new: :margin[5pt, 10px, .1in, 2mm];

Description This module implements the following CSS Units

Type Units
Length pt pc px mm cm in em ex vw vh
Resolution dpi dpcm dpx
Time s ms
Frequency hz khz
Percentage %

Methods

multi sub infix:<+css>

multi sub infix:<+css>(
    CSS::Units $v,
    CSS::Units $n
) returns Mu

explicit add

multi sub infix:<-css>

multi sub infix:<-css>(
    CSS::Units $v,
    CSS::Units $n
) returns Mu

explicit subtract