EnlighterJS / Plugin.WordPress

:package: Official WordPress Plugin of EnlighterJS
http://wordpress.org/plugins/enlighter/
GNU General Public License v2.0
118 stars 17 forks source link

EnlighterJs 4.1 - Theme Customizer - Not picking the set font size #254

Closed javadevcentral closed 4 years ago

javadevcentral commented 4 years ago

In EnlighterJs 4.1, the font-size in Fonts -> Global setting does not take effect.

Setting a custom font size adds the CSS .enlighter-t-wpcustom with the set font-size. But, the font-size gets overridden.

On analysing the Computed CSS on Chrome, the .enlighter span is overriding the custom font-size (.enlighter-t-wpcustom)

P.S: I was using enlighter as the base theme.


I guess this problem is not with all themes. I noticed that for some themes (like dracula), the following style is generated as (as part of enlighterjs.min.css)

.enlighter-t-wpcustom .enlighter span {
    font-size: <my_custom_font_size>
} 

I guess it is because of the additional selector (.enlighter span), it is working for other themes.

AndiDittrich commented 4 years ago

hi @javadevcentral ,

it was the expected behaviour. the "global" setting does only set the defaults of the theme but they were mostly overridden by the themes css (EnlighterJS <=3.2.0)

EnlighterJS v3.3.0 has changed this by using relative em based font sizes within the themes. Additionally the ThemeCustomizer v2.2.0 got a new setting to change the default token styles.

javadevcentral commented 4 years ago

@AndiDittrich Thanks for a swift response.

I'm confused a bit with the versions. The current enlighter plugin is 4.1.0. It uses

Would a new plugin version be released with updated EnlighterJS and ThemeCustomizer which would enable to change the font-sizes?

AndiDittrich commented 4 years ago

see the master branch...

javadevcentral commented 4 years ago

I see 4.2.0 in the changelog :) https://github.com/EnlighterJS/Plugin.WordPress/blob/master/CHANGES.md

Is it not yet deployed/released?

AndiDittrich commented 4 years ago

no, the stable release is 4.1

javadevcentral commented 4 years ago

This limitation (setting font-size) can be overcome once 4.2 is released and marked as stable, isn't it? So, I would have to wait and upgrade to 4.2? (If yes, any tentative date?)

AndiDittrich commented 4 years ago

there is no release date set.

i'll waiting until i get more feedback and a higher spreading of the v4 release

AndiDittrich commented 4 years ago

please open a new issue and post your config + link to an example page (set the font size to 2em for testing)

guitorioadar commented 4 years ago

PLEASE READ THE DOCUMENTATION PROPERLY

Everything is explained there perfectly....

i am so sorry... i missed some documentation.... i am deleting my comment... i didn't read the documentation properly...

This is just awesome...

AndiDittrich commented 4 years ago

no problem, a common issue