[DOCU-932] Show how to use the styleName field property Created: 02/Feb/17  Updated: 21/Jan/21  Resolved: 21/Jan/21

Status: Closed
Project: Documentation
Component/s: content
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Antti Hietala Assignee: Ashraf Khamis
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: 17m
Original Estimate: Not Specified


 Description   

Common field properties documents the styleName property as follows:

styleName. Optional. Adds one or more style names to this component. Multiple styles can be specified as a space-separated list of style names such as checkbox disabled. The style name will be rendered as an HTML class name, which can be used in a CSS definition. The class name is added to the field by calling the Vaadin method addStyleName.

This explanation is correct but incomplete. Please guide the user about where they should put the style rule. Should they add the CSS rule in the AdminCentral theme style sheet? If so, where is the AdminCentral CSS stored and how to edit it? Or should they create a completely new theme for their app in order to style the field?

Please provide another paragraph that guides the user about putting CSS rules in the right place.



 Comments   
Comment by Julie Legendre [ 30/Sep/19 ]

In order to better focus our efforts on DOCU tickets that are still relevant and important, all tickets older than 18 months have been labelled as outdated and are being automatically closed.
If you think your ticket is still relevant and should remain open, please add a comment and set it back to open.

Comment by Chris Jennings [ 20/Mar/20 ]

Hello. I have had a call with Tesco this morning about exactly this issue so I would like to re-open it. Thank you.

Comment by otto scholten [ 07/Jul/20 ]

Could we get some context around where to store the css? I am getting the same questions, thank you!

Comment by Ashraf Khamis [ 21/Jan/21 ]

Added more information to the common styleName property of both simple and complex fields. This affects https://docs.magnolia-cms.com/product-docs/Templating/Dialog-definition/Field-definition.html and all its child field pages.

Reviewed by Roman.

Generated at Mon Feb 12 01:13:37 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.