schema-based-json-editor icon indicating copy to clipboard operation
schema-based-json-editor copied to clipboard

How to control property title size in nested schema?

Open DomasM opened this issue 7 years ago • 4 comments

Version(if relevant): 1.0.0

7.20.3

Environment(if relevant):

Vue 2.6.6

My schema is few levels deep, i.e. object contains object which contains list, which contains object. Title font size is the same for all titles, with default class h3. If I set className property in schema to something and override font-size property via css, font-size changes only for the titles of properties in deepest elements. I would like to to be able to set different font sizes for titles of objects/lists in my schema.

DomasM avatar Apr 15 '19 09:04 DomasM

You can set css like .schema-based-json-editor--row h3 { font-size: '12px' }: https://github.com/plantain-00/schema-based-json-editor#improve-current-theme

or add className in schema, then set its css: https://github.com/plantain-00/schema-based-json-editor#non-standard-fields

plantain-00 avatar Apr 15 '19 12:04 plantain-00

Thank you for help, but I am aware of these possibilities. Why I can't make them work: Option no1: all the titles are h3, so I can't make them different. Option no2: this changes font size only for deepest objects properties titles, see image, I expected to change font size for '3. Interaction power measurements' image

DomasM avatar Apr 15 '19 13:04 DomasM

What's your style of bigfont? Can you try these?

.bigfont > h3 { font-size: '12px' }
.bigfont > label { font-size: '12px' }
.bigfont h3 { font-size: '12px' }
.bigfont label { font-size: '12px' }

屏幕快照 2019-04-15 22 20 40

plantain-00 avatar Apr 15 '19 14:04 plantain-00

Thank you, it looks like don't really know how to use css. This is the most reasonable result I have. I still need to redefine style for children elements to avoid modifying them, e.g. lines .bigfont h3 { font-size: 22px } and .bigfont2 h3 { color: black } image

DomasM avatar Apr 16 '19 08:04 DomasM