CMS Development

douglaswelcome
ๅ‚ๅŠ ่€…

CSS Leak Bug on Rich Text ๐Ÿ›๐Ÿ›๐Ÿ›๐Ÿ›๐Ÿ›

่งฃๆฑบ

CSS is leakin like a sieve. I am targeting 

<button>

with my css (using ::before and ::after), but it is leaking out all over the place in rich text editors. Probably happening elsewhere but this is the first place I've seen it.

 

here's my button:

image (2).png

 

But now all the menus in rich text editors are getting styled:

image (5).pngimage (4).pngimage (3).png

0 ใ„ใ„ใญ๏ผ
1ไปถใฎๆ‰ฟ่ชๆธˆใฟใƒ™ใ‚นใƒˆใ‚ขใƒณใ‚ตใƒผ
Siyabonga
่งฃๆฑบ็ญ–
ใƒกใƒณใƒใƒผ

CSS Leak Bug on Rich Text ๐Ÿ›๐Ÿ›๐Ÿ›๐Ÿ›๐Ÿ›

่งฃๆฑบ

It looks like the problem here might be that in your css you have targeted button tag which will style all button tags, you need to make sure your style is targeting that one specific element.

ๅ…ƒใฎๆŠ•็จฟใง่งฃๆฑบ็ญ–ใ‚’่ฆ‹ใ‚‹

5ไปถใฎ่ฟ”ไฟก
douglaswelcome
ๅ‚ๅŠ ่€…

CSS Leak Bug on Rich Text ๐Ÿ›๐Ÿ›๐Ÿ›๐Ÿ›๐Ÿ›

่งฃๆฑบ

I understand why its happening...just opening up the discussion as to whether it should...

0 ใ„ใ„ใญ๏ผ
Adesignl
ใƒˆใƒƒใƒ—ๆŠ•็จฟ่€… | Solutions Partner
ใƒˆใƒƒใƒ—ๆŠ•็จฟ่€… | Solutions Partner

CSS Leak Bug on Rich Text ๐Ÿ›๐Ÿ›๐Ÿ›๐Ÿ›๐Ÿ›

่งฃๆฑบ

I would say as a general rule you shouldnt style elements only. Well in most cases. 

 

add a class or use a parent selector at least. 

 

That being said hubspots styling should be pretty bullet proof, This happens when people style the button element directly iunstead of only styling the hs-button class instead. 

 

And no it shouldnt.

Adesignl
ใƒˆใƒƒใƒ—ๆŠ•็จฟ่€… | Solutions Partner
ใƒˆใƒƒใƒ—ๆŠ•็จฟ่€… | Solutions Partner

CSS Leak Bug on Rich Text ๐Ÿ›๐Ÿ›๐Ÿ›๐Ÿ›๐Ÿ›

่งฃๆฑบ

Do you still need help with this?

0 ใ„ใ„ใญ๏ผ
Siyabonga
่งฃๆฑบ็ญ–
ใƒกใƒณใƒใƒผ

CSS Leak Bug on Rich Text ๐Ÿ›๐Ÿ›๐Ÿ›๐Ÿ›๐Ÿ›

่งฃๆฑบ

It looks like the problem here might be that in your css you have targeted button tag which will style all button tags, you need to make sure your style is targeting that one specific element.

bronson
HubSpot Employee
HubSpot Employee

CSS Leak Bug on Rich Text ๐Ÿ›๐Ÿ›๐Ÿ›๐Ÿ›๐Ÿ›

่งฃๆฑบ

The inline editing captabilities within the hubspot CMS rely on the hubspot rich text UI rendering in the same frame as the website content itself.


A good read on best practices to ensure your code works well inside the editor can be found here https://designers.hubspot.com/how-to-make-custom-code-work-with-cms

0 ใ„ใ„ใญ๏ผ