I am working on building out a hub site and I'm wondering if inline styles will work since external style sheets aren't supported.
Solved! Go to Solution.
Ah. Okay, so the <form></form> elements will not work. I thought you were asking specifically about CSS, which is supported, but has some limitations when Shadow DOM is involved. With regards to HTML, we do not support form elements and/or Javascript code as it poses a security risk to our platform.
For a list of supported HTML, please refer to this documentation: https://doc.arcgis.com/en/hub/sites/add-text-and-images.htm#ESRI_SECTION1_15E3903373B04DF391D6DF5D15...
Additionally, we try to support most Calcite web component's from Esri's design system: https://developers.arcgis.com/calcite-design-system/components/
Yes, you can use inline styles directly on some elements and also styles you embed via <style></style> tags into a Text Card somewhere on your page. You may find that not all your styles will stick if you are using Calcite web components. This is because of something called the Shadow DOM, which is kind of hard to explain, so the short answer is that some styles are buried in a way that's difficult to overwrite.
Thank you for the quick answer. I understand the logistics of the Shadow DOM - just wasn't sure how creative I can be in the hub. I'm sure I'm going to find the limit but in the short term I've built a form using some of the <form></form> tags but the (I'm guessing default CMS) defaults are overriding some of the context so it's a learning curve.
Ah. Okay, so the <form></form> elements will not work. I thought you were asking specifically about CSS, which is supported, but has some limitations when Shadow DOM is involved. With regards to HTML, we do not support form elements and/or Javascript code as it poses a security risk to our platform.
For a list of supported HTML, please refer to this documentation: https://doc.arcgis.com/en/hub/sites/add-text-and-images.htm#ESRI_SECTION1_15E3903373B04DF391D6DF5D15...
Additionally, we try to support most Calcite web component's from Esri's design system: https://developers.arcgis.com/calcite-design-system/components/
I was initially asking about the CSS in the realm of styling but you answered a lot of the follow on questions I hadn't asked yet. Thank you for saving me some time, I'll read up some more.
Excellent. Glad I could help. 🙂