hyTags
HomeHome DocumentationDocumentation

style-get

Gets the inline style value of a CSS property on an element
Parameter
Type
Description
name
String
The name of the CSS property to retrieve
return
string
The inline style value as a string, or nil if not set
Test Case:Get inline style
    <div></div>
    
    <style-set name="color" value="red">
    <style-get name="color">
    <assert-equal value="red" type="string">
    
    👆 Try to change something!
  • Test Case:Get unset style returns nil
      <div></div>
      
      <style-get name="color">
      <value-is-nil>
      <assert-true>
      
      👆 Try to change something!
    • Test succeeded Test failed