This is an issue of specificity . The selector you've written is ".charsheet .sheet-attribute-score" (.charsheet is added for you if you didn't include it), while the selector in the application is ".ui-dialog .charsheet input[type=number]", which is more specific and thus gains priority. The specificity of a selector is based on the number of selector types in it. The selector types are (in order of increasing specificity): The universal selector: * Type selectors: the name of a tag, such as "input" Class selectors such as ".sheet-attribute-score" Attribute selectors such as "[type=number]" Pseudo-classes such as ":hover" (with the exception of :not(), but any selector types inside the :not() do count towards specificity) Id selectors such as #example (do not use ids or id selectors on your character sheets!) Inline styles So the built-in selector has 2 classes, a type, and an attribute selector. Your selector has 2 classes. You have two options for fixing this problem: either increase the specificity to be equal or greater than the built-in one (when two selectors of the same specificity conflict, the one defined later in the CSS wins, and character sheet CSS is defined after the default stuff), or , use !important. When a CSS property is followed by "!important", it overrides specificity (unless the same property is important in another selector!). !important is generally considered bad practice, but one of the cases where it's deemed acceptable is in overriding external CSS (such as, for example, the defaults in Roll20). You could rewrite your selector like this: .sheet-attribute-score { /* ... unchanged stuff ... */ height: 2em !important;
width: 2em !important; } Also, I recommend removing the spinner from the number input that's added by webkit browsers. When you have an extremely narrow number input, it gets in the way: input.sheet-attribute-score[type=number]::-webkit-outer-spin-button, input.sheet-attribute-score[type=number]::-webkit-inner-spin-button { -webkit-appearance: none;
}