struct Components::SafeStyleValue

Overview

The validated output of SafeStyle#build — the only way to obtain a style-attribute value through the safe path. Every character in it came from #to_css on a Color, a SafeLength, or an allowlisted keyword literal — there is no free-form string input anywhere in SafeStyle, so url(...)/expression(...)/@import/statement injection are unreachable by construction, not filtered after the fact.

Defined in:

components/safe/safe_style.cr

Instance Method Summary

Instance Method Detail

def to_s(io : IO) : Nil #
Description copied from struct Struct

Same as #inspect(io).


[View source]
def to_s : String #
Description copied from class Object

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.


[View source]