30 Seconds of CSS ⏱ (atomiks.github.io)
over 5 years ago from Raul Dronca, Designer
over 5 years ago from Raul Dronca, Designer
So many years and I had never heard of the truncate text snippet. Thanks!
The clearfix is now considered an hack and the floating divs is an obsolete method to make layouts since we have a full supported flex layout module and grid layout module. BTW nice project, it needs just some updates :)
UDPATE: It should show the original floating scope, floating elements inside the inline content flow. Like this
If you progressively enhance your website, you might every now and then still add a clearfix, because it is only obsolete, if your browser supports display: flow-root
.
Floating is not an obsolete technique, it was a hack because we used it for layouts. Now it can be used for what it was intended.
The Author of the posted content might want to add resources to the clearfix so people learn about the concepts involved in it. It is quite important to know why the clearfix is needed in many situations and what concepts are in place that make that so.
The clearfix is an hack (not the floating) used when you use float to make a layout. In the linked project the floating is used to put divs one beside each other (as the demo shows and why i said is an obsolete way to make layouts) and this is not what it was intended for.
Floating elements does not need any clearfix because is behavior is to be floated inside the inline content flow. Check this example of the "original" floating behavior:
I didn't say that it wasn't a hack. It is, but it deals with collapsing boxes, which of course is not the only technique, but one that works consistently and that does not require another element to work. I said...
Floating is not an obsolete technique, it was a hack because we used it for layouts. Now it can be used for what it was intended.
Which is true. Your fiddle is showing the intended behaviour. I said, that if you want to progressively enhance your website, you might still add a clearfix because you might have a layout that still floats for the most part. Again, a clearfix is not the only solution for dealing with collapsed containers.
The big issue is that many people don't even know why they use a clearfix, they just put it on, thinking that it must be done.
My PR with the clearfix
fixes is now merged. https://atomiks.github.io/30-seconds-of-css/#clearfix
I don't understand why you are telling me this, but.. uhm, congrats I guess? :D
Because, it explain my first comment that you still not understand. We can close this sub-thread :D
how do I "still not understand" your first comment? I wonder if you understood mine in the first place.
Great resource. The gradient button effect is very nice. Plus, I learnt a new and very useful CSS rule: text-overflow: ellipsi Thanks!
Thanks, for highlighting, this great little resource, it is amazing. The wonders of this wide web, of ours, never cease to amaze. Keep grinnin'.
The "pretty text underline" is not needed in newer versions of chrome.
Designer News
Where the design community meets.
Designer News is a large, global community of people working or interested in design and technology.
Have feedback?
Login to Comment
You'll need to log in before you can leave a comment.
LoginRegister Today
New accounts can leave comments immediately, and gain full permissions after one week.
Register now