Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
oddity in hive/textpattern.css
This (in the nightly builds, but with other selectors also in TXP 4.5.x):
.txp-label,
.txp-value {
display: inline-block;
float: left;
/* more */
}
I wonder what this combo does (aka is this a hack ?).
In my book it is completely non-sensical, as per CSS2.1:9.7, the display value of the element will be ‘block’ anyway. IOW, the display: inline-block
part is just clutter (or the float: left
part, omitting it would give equally good results in the supported browsers).
(I encountered the same weirdo combo in a stylesheet I recently inherited and asked on a CSS mailing list; nobody could find a good reason for it so far)
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: oddity in hive/textpattern.css
It goes on <span>
tags, which are by default inline not block elements, though now you mentioned it I seem to remember that I read somewhere that by floating something you change it’s status from inline to block anyway.
However, since the float is removed at media-query I would need to state the inline-block either as it current is or in the media-query rule – it makes little difference (I guess I could move it to the media-query just for cleanliness).
Offline
Re: oddity in hive/textpattern.css
philwareham wrote:
It goes on
<span>
tags, which are by default inline not block elements, though now you mentioned it I seem to remember that I read somewhere that by floating something you change it’s status from inline to block anyway.
Right, that’s CSS 2.1:9.7 linked above.
However, since the float is removed at media-query I would need to state the inline-block either as it current is or in the media-query rule – it makes little difference (I guess I could move it to the media-query just for cleanliness).
Oh, right, missed that one. Moving it would would be clearer cleaner yes.
Or, as I noted, drop the float declaration completely; you’ll get the same results.
(Which doesn’t solve my conundrum with that other stylesheet… :-( )
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Pages: 1