
de.bottlecaps.railroad.xq.style.xq Maven / Gradle / Ivy
(:~
: The CSS definitions module.
:)
module namespace style="de/bottlecaps/railroad/xq/style.xq";
import module namespace c="de/bottlecaps/railroad/xq/color.xq" at "color.xq";
import module namespace v="de/bottlecaps/railroad/xq/ast-to-svg.xq" at "ast-to-svg.xq";
declare namespace xhtml="http://www.w3.org/1999/xhtml";
(:~
: The default hue.
:)
declare variable $style:default-hue := 48;
(:~
: The default color code.
:)
declare variable $style:default-color := c:rgb(c:hsl-to-rgb($style:default-hue, $c:default-saturation, $c:default-lightness));
(:~
: The background color.
:
: @param $color the base color code.
: @return the rgb color string.
:)
declare function style:color-background($color as xs:string) {c:relative-color($color, 1.0, 0.97)};
(:~
: The foreground color.
:
: @param $color the base color code.
: @return the rgb color string.
:)
declare function style:color-foreground($color as xs:string) {c:relative-color($color, 1.0, 0.03)};
(:~
: The background color of buttons.
:
: @param $color the base color code.
: @return the rgb color string.
:)
declare function style:color-bg-button($color as xs:string) {c:relative-color($color, 0.60, 0.86)};
(:~
: The foreground color of buttons.
:
: @param $color the base color code.
: @return the rgb color string.
:)
declare function style:color-fg-button($color as xs:string) {c:relative-color($color, 1.0, 0.25)};
(:~
: The highlited background color.
:
: @param $color the base color code.
: @return the rgb color string.
:)
declare function style:color-bg-hilite($color as xs:string) {c:relative-color($color, 1.0, 0.91)};
(:~
: The highlited foreground color.
:
: @param $color the base color code.
: @return the rgb color string.
:)
declare function style:color-fg-hilite($color as xs:string) {c:relative-color($color, 1.0, 0.01)};
(:~
: The text editor background color.
:
: @param $color the base color code.
: @return the rgb color string.
:)
declare function style:color-text($color as xs:string) {c:relative-color($color, 1.0, 0.99)};
(:~
: Construct standard xhtml:style element for use by all pages.
:
: @param $color the base color code.
: @return the xhtml:style element
:)
declare function style:css($color as xs:string, $width as xs:integer?) as element(xhtml:style)
{
};
© 2015 - 2025 Weber Informatics LLC | Privacy Policy