Simple css not working on buttons


(Maik van Rossum) #1

Hi,

I’ve tried to add some css to the head of the document and use it to style some elements within Hype. The css is copied in form Sketch. It seems to work for a Text element, but not for a (textured) button.

The text element got the corresponding Class set via ‘edit inner html’ and the buttons via the ‘indentity inspector’.

The test file containing the code:
test.hype.zip (15.7 KB)

What am I doing wrong here?

Best regards,
Maik


#2

Hi @maikr

You need to add !important to the end of each declaration so that it will override the css that Hype uses

example:

background-image: linear-gradient(-180deg, #FC687C 0%, #FB4655 100%) !important;

(Maik van Rossum) #3

Thanks for your help, it works :smile:

Cheers,
Maik