Class: CustomElementsManifestParser::DataTypes::CssCustomProperty

Inherits:
BaseStruct
  • Object
show all
Defined in:
lib/custom_elements_manifest_parser/data_types/css_custom_property.rb

Overview

Documents a CssCustomProperty

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#defaultString?

Returns - The default initial value.

Returns:

  • (String, nil)
    • The default initial value


34
# File 'lib/custom_elements_manifest_parser/data_types/css_custom_property.rb', line 34

attribute :default, Types::Strict::String.optional.meta(required: false)

#deprecatednil, ...

Returns - Whether the CSS custom property is deprecated. If the value is a string, it's the reason for the deprecation.

Returns:

  • (nil, Boolean, String)

    - Whether the CSS custom property is deprecated. If the value is a string, it's the reason for the deprecation.



40
# File 'lib/custom_elements_manifest_parser/data_types/css_custom_property.rb', line 40

attribute :deprecated, Types::Strict::String.optional | Types::Strict::Bool.optional.meta(required: false)

#descriptionString?

Returns - A markdown description.

Returns:

  • (String, nil)
    • A markdown description.


30
# File 'lib/custom_elements_manifest_parser/data_types/css_custom_property.rb', line 30

attribute :description, Types::Strict::String.optional.meta(required: false)

#nameString

Returns - The name of the property, including leading --.

Returns:

  • (String)
    • The name of the property, including leading --.


10
# File 'lib/custom_elements_manifest_parser/data_types/css_custom_property.rb', line 10

attribute :name, Types::Strict::String

#summaryString?

Returns - A markdown summary suitable for display in a listing.

Returns:

  • (String, nil)
    • A markdown summary suitable for display in a listing.


26
# File 'lib/custom_elements_manifest_parser/data_types/css_custom_property.rb', line 26

attribute :summary, Types::Strict::String.optional.meta(required: false)

#syntaxString?

Returns - The expected syntax of the defined property. Defaults to "". The syntax must be a valid CSS syntax string as defined in the CSS Properties and Values API. Examples: "": accepts a color " | ": accepts lengths or percentages but not calc expressions with a combination of the two "small | medium | large": accepts one of these values set as custom idents. "": any valid token.

Returns:

  • (String, nil)

    - The expected syntax of the defined property. Defaults to "". The syntax must be a valid CSS syntax string as defined in the CSS Properties and Values API. Examples: "": accepts a color " | ": accepts lengths or percentages but not calc expressions with a combination of the two "small | medium | large": accepts one of these values set as custom idents. "": any valid token



22
# File 'lib/custom_elements_manifest_parser/data_types/css_custom_property.rb', line 22

attribute :syntax, Types::Strict::String.optional.meta(required: false)

Instance Method Details

#visit(parser:) ⇒ Object



42
43
44
# File 'lib/custom_elements_manifest_parser/data_types/css_custom_property.rb', line 42

def visit(parser:)
  self
end