Issue #2586πŸ’¬ AnsweredOpened February 19, 2020by liudmyla-schastlyvets0 reactions

How update style manager panel using few devices and custom css class

Quick answerby artf

Unfortunately, this is due to how getComputedStyle works, which returns resolved values, so by using rem instead of px "confuses" the value. At the moment I don't have any plan on fixing this issue but I'd really appreciate a PR or at least an idea on how to solve this

Read full answer below ↓

Question

There is a custom class added to simple grapesjs project: If there is no devices and user adds the class into the selectors field Settings sector is updated its font-size property correctly. <img width="1440" alt="Screen Shot 2020-02-19 at 2 33 50 AM" src="https://user-images.githubusercontent.com/32596493/74790527-7b0efe00-52c0-11ea-9999-a98fa654de56.png"> If there are few devices (one of them set like) and user adds the class into selectors field Settings sector isn't updated its font-size property correctly. <img width="1438" alt="Screen Shot 2020-02-19 at 2 40 29 AM" src="https://user-ima...

Answers (2)

artfβ€’ February 25, 2020

Unfortunately, this is due to how getComputedStyle works, which returns resolved values, so by using rem instead of px "confuses" the value. At the moment I don't have any plan on fixing this issue but I'd really appreciate a PR or at least an idea on how to solve this

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins β†’
Premium option

Premium plugins ship with support, regular updates, and production-ready features β€” save days of integration work.

Browse premium plugins β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.