StyleCustomizer : How to input "decimal" and "values without a unit".

Permalink
Hello,

I'm trying to input "decimal" and "values without a unit", but I can't.

For example,
@xxxxx-type-line-height : 1.5;
@xxxxx-type-font-size : 2.625rem;

How can I handle these values with StyleCustomizer?

 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi BeSharp,

Theme style customization appears to use a slider only and does not allow freeform input.

Are you using a custom theme?
BeSharp replied on at Permalink Reply
Hello MrKDilkington.

Yes, I'm making my own theme.
And I prefer to use em or rem for size.

So, I am looking for a way to direct input values.
BeSharp replied on at Permalink Reply
Changed:

So I fixed some files.

1. style-customizer.js(/concrete/js/)(palette.js, image.js, size.js, typography.js, inline-toolbar.js)
checked "'em'" and add "'rem'". Also for lineHeight, add "''".

2. Edit SizeStyle.php(/concrete/src/StyleCustomizer/Style/), SizeValue.php(/concrete/src/StyleCustomizer/Style/Value/)
Fix $unit = 'px'; to $unit = '';

I like style-custumizer, but some css elements have different units.
If some adjustment for different units, it will be a lot help for input values.