I am facing a really weird issue currently, I am working on a massive project in terms of size, with many html/js/etc files, but I am sharing one css file that's common to most of them. In one of my files, I was trying to add the following css:
.smallerDatetime {
width: 160px;
}
A very simple style that shouldn't have any issues, and then I added it to my controls:
<input id="toDate" type="text" class="form-control datetimeController smallerDatetime" placeholder="To">
Initially, this didn't work. I was curious if somehow there was an issue of the rule not being loaded, but on my browser's dev mode I saw this:
From this point, it was clear that the CSS rule was being loaded. Then I started to wonder if what I knew about classes (Where the right-most class usually overrides the ones to its left) was wrong, and I tried:
<input id="toDate" type="text" class="smallerDatetime form-control datetimeController" placeholder="To">
Which expectedly didn't work either. Later on, I tried the following:
<input id="toDate" type="text" class="smallerDatetime form-control" placeholder="To" style="width:160px">
which surprisingly worked, but then it made me more confused. It was clear that the rule was being loaded (especially as the css- is handled and imported server-side, and after clearing the cache it was very easy to verify it was updated), but somehow not applying. What can I be missing here?
I tried to look around existing answers, but most of them had an issue with the formatting, or other issues with the rules themselves, but in this case I know the rule works since it is fine in the style. And all other rules in the css and the same html file work fine.