background preloader

Information

Facebook Twitter

CSS-Tricks. The following is a collaborative post by guest Joe Richardson, Robin Rendle, and a bunch of the CSS-Tricks staff.

CSS-Tricks

Joe wanted to do a post about BEM, which we loved, and just about everybody around here had thoughts and opinions about BEM, so we figured we'd all get together on it and do it together. The Block, Element, Modifier methodology (commonly referred to as BEM) is a popular naming convention for classes in HTML and CSS. Developed by the team at Yandex, its goal is to help developers better understand the relationship between the HTML and CSS in a given project. Here's an example of what a CSS developer writing in the BEM style might write: /* Block component */ .btn {} /* Element that depends upon the block */ .btn__price {} /* Modifier that changes the style of the block */ .btn--orange {} .btn--big {} 20 inspirational examples of CSS Web design Creative Bloq. It's amazing what can be done with CSS these days.

20 inspirational examples of CSS Web design Creative Bloq

Support for the latest CSS3 properties is strong in the latest versions of all the major browsers – even Internet Explorer – and the possibilities for typography, animation and interactivity have never been greater. But finding web design inspiration can be tricky. At its core the secret to a great website is not about showing off with slick visuals and whizz-bang features, but lies in creating a great experience for users through a layout and navigation that guide them to where they want to go quickly and effortlessly. That said, if it can look beautiful as well, that's the icing on the cake. Html - Single huge .css file vs. multiple smaller specific .css files. CSS Zen Garden: The Beauty of CSS Design.

Should You Reset Your CSS? By Michael Tuck This article explores the ongoing debate on whether or not web designers and web developers should reset their CSS, sharing the thoughts and opinions of several web professionals.

Should You Reset Your CSS?

This is a three-part series of articles on the topic of CSS resets. After discussing the rich and interesting history of CSS resets (Part 1) and going over CSS reset stylesheet options (Part 2), we will now discuss the pros and cons of using reset stylesheets here in Part 3. The Benefits of Resetting Your CSS Web designer/developer and book author Morten Rand-Hendriksen is a huge fan of CSS resets; he has advised everyone to use them as the foundation of their stylesheets. Defending the "hard reset" method, Coyier outlined two main concerns that web designers typically have against using the universal selector. The first is that it can break web browser default styles for things such as form elements, which he said was "untrue" unless you use a border:0 property in the style rule. Acknowledgements. !important CSS Declarations: How and When to Use Them.

Advertisement When the CSS1 specification was drafted in the mid to late 90s, it introduced ! Important declarations that would help developers and users easily override normal specificity when making changes to their stylesheets. For the most part, ! Important declarations have remained the same, with only one change in CSS2.1 and nothing new added or altered in the CSS3 spec in connection with this unique declaration. Let’s take a look at what exactly these kinds of declarations are all about, and when, if ever, you should use them. A Brief Primer on the Cascade. CSS Specificity And Inheritance. Advertisement CSS’ barrier to entry is extremely low, mainly due to the nature of its syntax.

CSS Specificity And Inheritance

Being clear and easy to understand, the syntax makes sense even to the inexperienced Web designer. It’s so simple, in fact, that you could style a simple CSS-based website within a few hours of learning it. But this apparent simplicity is deceitful. If after a few hours of work, your perfectly crafted website looks great in Safari, all hell might break loose if you haven’t taken the necessary measures to make it work in Internet Explorer. Understanding a few often overlooked concepts is also important. Home - Scalable and Modular Architecture for CSS. Refining The Way We Structure Our CSS At Trello. Have you been reading all the blog posts about the CSS architecture at various companies out there?

Refining The Way We Structure Our CSS At Trello

No? Check out the ones for GitHub, CodePen, Lonely Planet, Medium, and Buffer. I can’t get enough of them. We’ve slowly been refining the way we structure our CSS at Trello. I can firmly say it’s pretty okay now, nearing on good. The ToolsFile StructureModulesWhat about JavaScript? Horizontal and Vertical Centering Using CSS: A Beginner’s Guide. Understanding vertical-align, or "How (Not) To Vertically Center Content"

A FAQ on various IRC channels I help out on is How do I vertically center my stuff inside this area?

Understanding vertical-align, or "How (Not) To Vertically Center Content"

This question is often followed by I'm using vertical-align:middle but it's not working! The problem here is three-fold: HTML layout traditionally was not designed to specify vertical behavior. By its very nature, it scales width-wise, and the content flows to an appropriate height based on the available width. CSS Reference. Useful :nth-child Recipes. I get a little giddy when I come across perfect uses for :nth-child or :nth-of-type (read about the difference).

Useful :nth-child Recipes

The better you understand them, the more css nerdgasms you get to have! In these simple "recipes" (really: expressions) I'll arbitrarily use a flat list of list items and randomly chosen numbers. Downloads. Myth - CSS the way it was imagined. Adobe/cssfilterlab. 101 CSS and JavaScript tutorials to power up your skills Web design Creative Bloq. There are so many blogs and sites publishing high quality CSS and JavaScript tutorials these days that it can be hard to keep track - and it's easy to miss an amazing tutorial completely.

101 CSS and JavaScript tutorials to power up your skills Web design Creative Bloq

And sod's law dictates that the one you do miss will be the one that could have saved you days of work on your latest project... Subscription offer So to help out we've rounded up some of the very best CSS and JavaScript tutorials from around the web, covering web design techniques old and new, how to use the latest tools and frameworks, and a series of projects you can sink your teeth into. They're all written by leading experts in the field, and many come with downloadable code you can play around with. Finally, we've grouped the tutorials into a series of categories to make it easier to find what you're looking for. Read all the tutorials on Creative Bloq here. A Beginner's Guide to HTML & CSS.

The pro's guide to CSS layouts. Favicons Next To External Links CSS-Tricks. I've had this JSFiddle (broken, see this Pen for fixed version) from CSS Wizardry open for like 2 weeks in my browser.

Favicons Next To External Links CSS-Tricks

I kept thinking about it, because before that I got an email from someone asking about essentially the same thing and it stuck in my head. 20 inspirational examples of CSS Web design Creative Bloq. It's amazing what can be done with CSS these days.

20 inspirational examples of CSS Web design Creative Bloq

Support for the latest CSS3 properties is strong in the latest versions of all the major browsers - even Internet Explorer - and the possibilities for typography, animation and interactivity have never been greater. But finding web design inspiration can be tricky. At its core the secret to a great website is not about showing off with slick visuals and whizz-bang features, but lies in creating a great experience for users through a layout and navigation that guide them to where they want to go quickly and effortlessly. That said, if it can look beautiful as well, that's the icing on the cake.

47 CSS Tips & Tricks To Take Your Site To The Next Level. CSS is a wonderful language for presenting web pages. It’s not too difficult to learn, though like most things, it does have a learning curve. Where many people seem to get tripped up is in specific solutions to specific problems. Fortunately there’s a good chance that someone before you has already had the same problem and even better has found a solution. Here are 47 of those solutions. 47 CSS Tips, Tricks, and Techniques to add to your CSS toolbox. Some you may be familiar with while others may be new to you. 101 CSS and JavaScript tutorials to power up your skills Web design Creative Bloq.