{"id":4281,"date":"2024-04-15T03:48:31","date_gmt":"2024-04-14T19:48:31","guid":{"rendered":"https:\/\/webflow.tenten.co\/?p=4281"},"modified":"2024-04-15T03:48:31","modified_gmt":"2024-04-14T19:48:31","slug":"customized-css-attributes-and-characteristics","status":"publish","type":"post","link":"https:\/\/webflow.tenten.co\/en\/customized-css-attributes-and-characteristics\/","title":{"rendered":"Customized CSS attributes and characteristics"},"content":{"rendered":"\n<div class=\"docs_rich-text w-richtext\">\n<p>To customize HTML elements, you insert <a href=\"https:\/\/webflow.com\/glossary\/cascading-style-sheets-css\">Cascading Style Sheets<\/a> (CSS) attributes to classes or selectors. In Webflow, the Style panel grants access to numerous CSS attributes (e.g., location, overflow, box-shadow, etc.) \u2014 however, it doesn\u2019t accommodate <em>all<\/em> CSS attributes.<\/p>\n<p>By utilizing tailored CSS attributes and specifications, you can integrate a wider spectrum of CSS attributes and values that are not inherently supported in the Style panel. This enhances your flexibility for designing and diminishes the necessity for personalized code embeddings, streamlining your design workflow. <\/p>\n<h6><strong>Remark:<\/strong> CSS attributes with restricted browser backing and attributes with vendor prefixes (e.g., -webkit) are not supported as personalized attributes.<\/h6>\n<h6><strong>Useful insight:<\/strong> Certain CSS attributes might impact website performance. We recommend optimizing the utilization of intricate CSS functions and attributes while minimizing extensive CSS utilization when plausible.<\/h6>\n<p>In this tutorial, you will grasp:<\/p>\n<ol start=\"1\" role=\"list\">\n<li>How to incorporate tailored attributes and values<\/li>\n<li>How to link personalized values to Webflow-compatible attributes<\/li>\n<li>How to implement variables in personalized values<\/li>\n<li>Common inquiries and problem-solving techniques<\/li>\n<\/ol>\n<h2>How to incorporate tailored attributes and values<\/h2>\n<h6><strong>Prior to commencing:<\/strong> Establish a class on the element or utilize an HTML tag selector to choose a set of elements to which you aim to append tailored attributes.<\/h6>\n<p>To append a personalized attribute to a class:<\/p>\n<ol start=\"1\" role=\"list\">\n<li>Select the element to which you desire to enforce a personalized attribute<\/li>\n<li>Visit <strong>Style panel<\/strong> &gt; <strong>Custom properties<\/strong><\/li>\n<li>Click <strong>Add<\/strong><\/li>\n<li>Enter a CSS attribute <strong>designation<\/strong> in the designation field (e.g., text-decoration-color)<\/li>\n<li>Input a <strong>value<\/strong> in the field (e.g., #146EF5)<\/li>\n<li>Hit <strong>Enter<\/strong> on your keyboard<\/li>\n<\/ol>\n<h6><strong>Insider tip:<\/strong> You can employ customized values that involve advanced functions (e.g., calc(), color-mix(), etc.) for more accurate and dynamic design influence.<\/h6>\n<h6><strong>Insider tip:<\/strong> You can insert numerous lines of CSS in <strong>Style panel<\/strong> &gt; <strong>Custom properties<\/strong>. Webflow <a href=\"https:\/\/webflow.com\/glossary\/automagically\">automatically<\/a> organizes and applies your CSS to the selected elements. <\/h6>\n<p>As you input a property name, an autocomplete compilation of accessible properties and corresponding keyboard shortcuts (e.g., <strong>Command<\/strong> + <strong>1<\/strong>, <strong>Command<\/strong> + <strong>2<\/strong>, etc.) will materialize. To automate the property field, press <strong>Command<\/strong> (on Mac) or <strong>Control<\/strong> (on Windows) + <strong>Number<\/strong> shown in the autocomplete list next to the desired property, or utilize the <strong>Up<\/strong> and <strong>Down<\/strong> keys on your keyboard to highlight the property you desire to utilize and press <strong>Enter <\/strong>or<strong> Tab<\/strong> to select it. <\/p>\n<h6><strong>Insider tip:<\/strong> When applying a sequence of tailored attributes and values, you can press <strong>Tab<\/strong> after inputting a value to record the value <em>and<\/em> commence the following property you desire to add.<\/h6>\n<p>The Designer canvas promptly reflects your alterations as you introduce tailored attributes and values. If you insert a Webflow-compatible attribute and assign it a customized value, it will supersede any existing value set in the Style panel. Similar to any style applied in the Style panel, you can also impart different values to distinct breakpoints.<\/p>\n<p>If you intend to consult the MDN documentation for a specific attribute, hover over the attribute name and tap <strong>View on MDN<\/strong>. You can also hold <strong>Command<\/strong> (on Mac) or <strong>Control<\/strong> (on Windows) on your keyboard and tap the attribute name to unlock its MDN documentation in a fresh tab.<\/p>\n<p>To eliminate a personalized attribute from a class or tag, hover over the attribute you wish to erase, and hit the \u201c<strong>trash<\/strong>\u201d icon.<\/p>\n<h2>How to link personalized values to Webflow-compatible CSS attributes<\/h2>\n<p>While you can attach personalized values to existing Webflow-compatible attributes by typing them in <strong>Style panel <\/strong>&gt; <strong>Custom properties<\/strong>, you can also link personalized values to those Webflow-compatible font, size, and color attributes directly: <\/p>\n<ol start=\"1\" role=\"list\">\n<li>Launch the <strong>Style panel<\/strong><\/li>\n<li>Click or hover over the input field where you wish to apply a personalized value (e.g., the input for the width property)<\/li>\n<li>Tap the purple \u201c<strong>dot<\/strong>\u201d icon \u2014 bear in mind that the purple \u201c<strong>dot<\/strong>\u201d icon will only appear on font, size, and color attributes<\/li>\n<li>Click the <strong>Custom<\/strong> tab<\/li>\n<li>Input a <strong>personalized value<\/strong> in the field (e.g., clamp(1rem, 1.5rem, 1.5rem)) <\/li>\n<\/ol>\n<h6><strong>Remark:<\/strong> You cannot employ customized CSS values for background attributes (e.g., background color, background size, etc.) or any sub-properties (e.g., box-shadow: 2px custom-value-offset 3px 4px #146EF5).<\/h6>\n<p>If you aim to apply a personalized value to a non-font, size, or color attribute, you can first append the personalized value in <strong>Style panel<\/strong> &gt; <strong>Custom properties<\/strong>. <\/p>\n<p>To detach a personalized value from a Webflow-compatible attribute, tap the personalized value you desire to erase, then tap the \u201c<strong>unlink<\/strong>\u201d icon. Once unlinked, the value reverts to its default in Webflow (e.g., width reverts to auto, opacity reverts to 100%, etc.). <\/p>\n<h2>How to utilize variables in personalized values<\/h2>\n<p>You can integrate variables in your personalized values.<\/p>\n<h6><strong>Remark:<\/strong> You can solely utilize a variable as a personalized CSS value if the personalized CSS value is the same type as the variable value (e.g., you can solely set a color variable as the value of a personalized attribute that accepts color values). <\/h6>\n<p>To associate a variable to the value of an attribute:<\/p>\n<ol start=\"1\" role=\"list\">\n<li>Initiate the <strong>Variables panel<\/strong><\/li>\n<li>Hover over the variable you desire to use as a personalized CSS value <\/li>\n<li>Tap the settings \u201c<strong>cog<\/strong>\u201d icon<\/li>\n<li>Tap the <strong>CSS<\/strong> field to replicate its value (e.g., var(&#8211;webflow-blue)) <\/li>\n<li>Select the element to which you wish to apply a personalized attribute <\/li>\n<li>Advance to <strong>Style panel<\/strong> &gt; <strong>Custom properties<\/strong><\/li>\n<li>Click <strong>Add<\/strong><\/li>\n<li>Input a CSS attribute <strong>designation<\/strong> in the field (e.g., text-decoration-color)<\/li>\n<li>Paste in the value you replicated from the <strong>CSS<\/strong> field in the <strong>value<\/strong> field<\/li>\n<li>Hit <strong>Enter<\/strong> on your keyboard<\/li>\n<\/ol>\n<h6><strong>Remark:<\/strong> If you alter the name of a variable utilized in a personalized value, you will need to manually update the personalized value to align. <\/h6>\n<h2>FAQ and troubleshooting<\/h2>\n<h3>I aspire to utilize a vendor-prefixed personalized CSS attribute, but the choice is absent in the autocomplete list.<\/h3>\n<p>CSS attributes with restricted browser backing and attributes with vendor prefixes (e.g., -webkit) are not supported as personalized attributes. <\/p>\n<h3>I wish to define personalized values on an attribute, but the attribute is not in the autocomplete list.<\/h3>\n<p>You are unable to define personalized values on the following attributes currently: <\/p>\n<ul role=\"list\">\n<li>background<\/li>\n<li>background-attachment<\/li>\n<li>background-image<\/li>\n<li>background-position<\/li>\n<li>background-repeat<\/li>\n<li>background-size<\/li>\n<li>font-variation-settings<\/li>\n<li>transition<\/li>\n<li>transition-delay<\/li>\n<li>transition-duration<\/li>\n<li>transition-property<\/li>\n<li>transition-timing-function<\/li>\n<\/ul>\n<h3>My personalized value results in an input error.<\/h3>\n<p>Kindly ensure the value you have set is valid CSS and is supported by the attribute you have selected. Hover over the attribute name and tap <strong>View on MDN<\/strong> to visit the MDN documentation and ensure the attribute and value are set correctly. <\/p>\n<h3>My personalized attribute and value are not reflected on the Designer canvas.<\/h3>\n<p>If the attribute and value were configured appropriately but are not reflected on the Designer canvas, scrutinize any custom code on your site and\/or in custom code embed elements and eliminate any conflicting attributes and values. You should also inspect for any conflicting longhand and <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/Shorthand_properties\">shorthand properties<\/a> \u2014 for instance, if you have defined margin-top using the controls in <strong>Style panel<\/strong> &gt; <strong>Spacing<\/strong><em>and<\/em> appended a shorthand margin attribute in <strong>Style panel<\/strong> &gt; <strong>Custom properties<\/strong>, one value may take precedence over the other.<\/p>\n<h3>My personalized attribute and value are not rendering on the published site. <\/h3>\n<p>If the attribute and value were configured correctly but are not rendering on the published site, confirm that the browser you are testing with supports the attribute and value. You can <a href=\"https:\/\/caniuse.com\/\">visit the Can I use? site<\/a> and search for a CSS attribute to determine its browser compatibility. <\/p>\n<p>If issues persist, or to report any other concerns, please <a href=\"https:\/\/support.webflow.com\/\">reach out to the customer support team<\/a> with steps for duplicating the issue.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"Apply custom CSS properties to your classes \u2014 even properties without native Style panel controls.","protected":false},"author":2,"featured_media":5182,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"om_disable_all_campaigns":false,"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"csco_display_header_overlay":false,"csco_singular_sidebar":"","csco_page_header_type":"","footnotes":""},"categories":[284],"tags":[],"class_list":{"0":"post-4281","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-layout-design","8":"cs-entry"},"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/webflow.tenten.co\/en\/wp-json\/wp\/v2\/posts\/4281","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webflow.tenten.co\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webflow.tenten.co\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webflow.tenten.co\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/webflow.tenten.co\/en\/wp-json\/wp\/v2\/comments?post=4281"}],"version-history":[{"count":0,"href":"https:\/\/webflow.tenten.co\/en\/wp-json\/wp\/v2\/posts\/4281\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webflow.tenten.co\/en\/wp-json\/wp\/v2\/media\/5290"}],"wp:attachment":[{"href":"https:\/\/webflow.tenten.co\/en\/wp-json\/wp\/v2\/media?parent=4281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webflow.tenten.co\/en\/wp-json\/wp\/v2\/categories?post=4281"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webflow.tenten.co\/en\/wp-json\/wp\/v2\/tags?post=4281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}