That seems really odd. It definitely works normally. Maybe inspect the element with the dev tools and see if the CSS is being overruled by anything?

Or take a screenshot of the editor and compare it to after you add the CSS to see if somehow you are targeting some other element. I doubt it but it is always possible.