html_compose.attributes.source_attrs
1from . import BaseAttribute 2 3 4class SourceAttrs: 5 """ 6 This module contains functions for attributes in the 'source' element. 7 Which is inherited by a class so we can generate type hints 8 """ 9 10 @staticmethod 11 def height(value: int) -> BaseAttribute: 12 """ 13 "source" attribute: height 14 Vertical dimension 15 16 Args: 17 value: 18 Valid non-negative integer 19 20 Returns: 21 An height attribute to be added to your element 22 23 """ 24 25 return BaseAttribute("height", value) 26 27 @staticmethod 28 def media(value) -> BaseAttribute: 29 """ 30 "source" attribute: media 31 Applicable media 32 33 Args: 34 value: 35 Valid media query list 36 37 Returns: 38 An media attribute to be added to your element 39 40 """ 41 42 return BaseAttribute("media", value) 43 44 @staticmethod 45 def sizes(value) -> BaseAttribute: 46 """ 47 "source" attribute: sizes 48 Image sizes for different page layouts 49 50 Args: 51 value: 52 Valid source size list 53 54 Returns: 55 An sizes attribute to be added to your element 56 57 """ 58 59 return BaseAttribute("sizes", value) 60 61 @staticmethod 62 def src(value) -> BaseAttribute: 63 """ 64 "source" attribute: src 65 Address of the resource 66 67 Args: 68 value: 69 Valid non-empty URL potentially surrounded by spaces 70 71 Returns: 72 An src attribute to be added to your element 73 74 """ 75 76 return BaseAttribute("src", value) 77 78 @staticmethod 79 def srcset(value) -> BaseAttribute: 80 """ 81 "source" attribute: srcset 82 Images to use in different situations, e.g., high-resolution displays, small monitors, etc. 83 84 Args: 85 value: 86 Comma-separated list of image candidate strings 87 88 Returns: 89 An srcset attribute to be added to your element 90 91 """ 92 93 return BaseAttribute("srcset", value) 94 95 @staticmethod 96 def type(value) -> BaseAttribute: 97 """ 98 "source" attribute: type 99 Type of embedded resource 100 101 Args: 102 value: 103 Valid MIME type string 104 105 Returns: 106 An type attribute to be added to your element 107 108 """ 109 110 return BaseAttribute("type", value) 111 112 @staticmethod 113 def width(value: int) -> BaseAttribute: 114 """ 115 "source" attribute: width 116 Horizontal dimension 117 118 Args: 119 value: 120 Valid non-negative integer 121 122 Returns: 123 An width attribute to be added to your element 124 125 """ 126 127 return BaseAttribute("width", value)
5class SourceAttrs: 6 """ 7 This module contains functions for attributes in the 'source' element. 8 Which is inherited by a class so we can generate type hints 9 """ 10 11 @staticmethod 12 def height(value: int) -> BaseAttribute: 13 """ 14 "source" attribute: height 15 Vertical dimension 16 17 Args: 18 value: 19 Valid non-negative integer 20 21 Returns: 22 An height attribute to be added to your element 23 24 """ 25 26 return BaseAttribute("height", value) 27 28 @staticmethod 29 def media(value) -> BaseAttribute: 30 """ 31 "source" attribute: media 32 Applicable media 33 34 Args: 35 value: 36 Valid media query list 37 38 Returns: 39 An media attribute to be added to your element 40 41 """ 42 43 return BaseAttribute("media", value) 44 45 @staticmethod 46 def sizes(value) -> BaseAttribute: 47 """ 48 "source" attribute: sizes 49 Image sizes for different page layouts 50 51 Args: 52 value: 53 Valid source size list 54 55 Returns: 56 An sizes attribute to be added to your element 57 58 """ 59 60 return BaseAttribute("sizes", value) 61 62 @staticmethod 63 def src(value) -> BaseAttribute: 64 """ 65 "source" attribute: src 66 Address of the resource 67 68 Args: 69 value: 70 Valid non-empty URL potentially surrounded by spaces 71 72 Returns: 73 An src attribute to be added to your element 74 75 """ 76 77 return BaseAttribute("src", value) 78 79 @staticmethod 80 def srcset(value) -> BaseAttribute: 81 """ 82 "source" attribute: srcset 83 Images to use in different situations, e.g., high-resolution displays, small monitors, etc. 84 85 Args: 86 value: 87 Comma-separated list of image candidate strings 88 89 Returns: 90 An srcset attribute to be added to your element 91 92 """ 93 94 return BaseAttribute("srcset", value) 95 96 @staticmethod 97 def type(value) -> BaseAttribute: 98 """ 99 "source" attribute: type 100 Type of embedded resource 101 102 Args: 103 value: 104 Valid MIME type string 105 106 Returns: 107 An type attribute to be added to your element 108 109 """ 110 111 return BaseAttribute("type", value) 112 113 @staticmethod 114 def width(value: int) -> BaseAttribute: 115 """ 116 "source" attribute: width 117 Horizontal dimension 118 119 Args: 120 value: 121 Valid non-negative integer 122 123 Returns: 124 An width attribute to be added to your element 125 126 """ 127 128 return BaseAttribute("width", value)
This module contains functions for attributes in the 'source' element. Which is inherited by a class so we can generate type hints
11 @staticmethod 12 def height(value: int) -> BaseAttribute: 13 """ 14 "source" attribute: height 15 Vertical dimension 16 17 Args: 18 value: 19 Valid non-negative integer 20 21 Returns: 22 An height attribute to be added to your element 23 24 """ 25 26 return BaseAttribute("height", value)
"source" attribute: height Vertical dimension
Args: value: Valid non-negative integer
Returns: An height attribute to be added to your element
28 @staticmethod 29 def media(value) -> BaseAttribute: 30 """ 31 "source" attribute: media 32 Applicable media 33 34 Args: 35 value: 36 Valid media query list 37 38 Returns: 39 An media attribute to be added to your element 40 41 """ 42 43 return BaseAttribute("media", value)
"source" attribute: media Applicable media
Args: value: Valid media query list
Returns: An media attribute to be added to your element
45 @staticmethod 46 def sizes(value) -> BaseAttribute: 47 """ 48 "source" attribute: sizes 49 Image sizes for different page layouts 50 51 Args: 52 value: 53 Valid source size list 54 55 Returns: 56 An sizes attribute to be added to your element 57 58 """ 59 60 return BaseAttribute("sizes", value)
"source" attribute: sizes Image sizes for different page layouts
Args: value: Valid source size list
Returns: An sizes attribute to be added to your element
62 @staticmethod 63 def src(value) -> BaseAttribute: 64 """ 65 "source" attribute: src 66 Address of the resource 67 68 Args: 69 value: 70 Valid non-empty URL potentially surrounded by spaces 71 72 Returns: 73 An src attribute to be added to your element 74 75 """ 76 77 return BaseAttribute("src", value)
"source" attribute: src Address of the resource
Args: value: Valid non-empty URL potentially surrounded by spaces
Returns: An src attribute to be added to your element
79 @staticmethod 80 def srcset(value) -> BaseAttribute: 81 """ 82 "source" attribute: srcset 83 Images to use in different situations, e.g., high-resolution displays, small monitors, etc. 84 85 Args: 86 value: 87 Comma-separated list of image candidate strings 88 89 Returns: 90 An srcset attribute to be added to your element 91 92 """ 93 94 return BaseAttribute("srcset", value)
"source" attribute: srcset Images to use in different situations, e.g., high-resolution displays, small monitors, etc.
Args: value: Comma-separated list of image candidate strings
Returns: An srcset attribute to be added to your element
96 @staticmethod 97 def type(value) -> BaseAttribute: 98 """ 99 "source" attribute: type 100 Type of embedded resource 101 102 Args: 103 value: 104 Valid MIME type string 105 106 Returns: 107 An type attribute to be added to your element 108 109 """ 110 111 return BaseAttribute("type", value)
"source" attribute: type Type of embedded resource
Args: value: Valid MIME type string
Returns: An type attribute to be added to your element
113 @staticmethod 114 def width(value: int) -> BaseAttribute: 115 """ 116 "source" attribute: width 117 Horizontal dimension 118 119 Args: 120 value: 121 Valid non-negative integer 122 123 Returns: 124 An width attribute to be added to your element 125 126 """ 127 128 return BaseAttribute("width", value)
"source" attribute: width Horizontal dimension
Args: value: Valid non-negative integer
Returns: An width attribute to be added to your element