background preloader

Css and sass

Facebook Twitter

BIANCHI CAFÉ & CYCLES. CSS Filters. CSS filter support recently landed within WebKit nightlies.

CSS Filters

CSS filters provide a method for modifying the rendering of a basic DOM element, image, or video. CSS filters allow for blurring, warping, and modifying the color intensity of elements. Let's have a look at how CSS filters work and how you can quickly create elements that are beautifully filtered! There are many CSS filters to choose from: grayscale, blur, sepia, saturate, opacity, brightness, contrast, hue-rotate, and invert. While each property value generally falls between 0 and 1, there are a few exceptions. The following CSS snippet will blur an element: Multiple filters are separated by spaces, so we could also add grayscale and opacity values to the blur: CSS Design Awards - Search Results.

Pseudo selectors

CSS Media Queries & Using Available Space. We've covered using CSS media queries to assign different stylesheets depending on browser window size.

CSS Media Queries & Using Available Space

In that example, we changed the layout of the entire page based on the space available. It isn't required that we make such drastic changes with this technique though, so in this tutorial we'll go over a design tweak with a smaller scope. We'll also cover the syntax for using media queries within a single stylesheet and more examples of that. The CSS media query syntax for calling an external stylesheet is like this: You may be familiar with the media attribute, normally being "screen" or "print" or even a comma separated list, like "screen, projection".

Likewise, you can use more advanced CSS media queries like: You may use as many media queries as you would like in a CSS file. Example Let's say we have a fluid width design where the sidebar is 35% of the width of the page. In our example sidebar, we are going have a list of names of the Super Team which function as email links. Types. CSS: centering things. See also the index of all tips.

CSS: centering things

Centering lines of text The most common and (therefore) easiest type of centering is that of lines of text in a paragraph or in a heading. Quick Tip: CSS 100% Height. I don’t know about you, but I always get frustrated trying to figure out how to get my layout to stretch vertically to 100% of the page.

Quick Tip: CSS 100% Height

I have a div that I want to stretch, but it just doesn’t stretch. Now why wouldn’t it do that? Today I will share the solution with you. Say you have coded an HTML file like this: <! And you have a CSS file like this: That gives you this example file. Let me give you a different way of thinking about HTML. When we put the “height: 100%;” style onto the <div id=”content”> box, what we are doing is telling it to stretch to the full height of the box that it is in. To fix this, we need to tell the <body> box to get bigger. So if we change our CSS file to this: And that’s it! Update: Thanks to some very helpful comments, I have updated the final CSS so that the #content div now has “min-height: 100%” instead of just “height: 100%”. An introduction to meta viewport and @viewport.

By Andreas Bovens Introduction Support for the viewport meta tag in Opera’s mobile products has been around for quite some time, and from Opera Mobile 11 onward, we have made our viewport implementation more robust, added support for new mechanisms to deal with different screen densities, and included an implementation of our own CSS @viewport rule proposal.

An introduction to meta viewport and @viewport

Learn CSS Layout. Sass - Syntactically Awesome Stylesheets.

Background effects

Sass vs. LESS. "Which CSS preprocessor language should I choose?

Sass vs. LESS

" is a hot topic lately. I've been asked in person several times and an online debate has been popping up every few days it seems. It's nice that the conversation has largely turned from whether or not preprocessing is a good idea to which one language is best. Let's do this thing. Really short answer: Sass Slightly longer answer: Sass is better on a whole bunch of different fronts, but if you are already happy in LESS, that's cool, at least you are doing yourself a favor by preprocessing. Much longer answer: Read on. The Much Longer Answer The Learning Curve with Ruby and Command Line and Whatever The only learning curve is the syntax. Winner: Nobody Helping with CSS3 With either language, you can write your own mixins to help with vendor prefixes.

In Sass, you can use Compass, and Compass will keep itself updated, and thus the prefix situation is handled for you. In LESS, there are also some mixin libraries battling to be the best. Convert pt to em.