@mrjyn
June 16, 2011
5 Awesome Art Deco Shadows
parisienne
via fontspace.com ...»See Ya
Rolling Vortices of Lust for June 15
Rolling Vortices of Lust for June 15
| ||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||
Newsletter communications by Dialect Click here to unsubscribe |
font-family:Zapf-Chancery;
font-size: .9em;
color: #b5b;
background:url(http://westciv.com/style_master/academy/hands_on_tutorial/images/identifying_elements.gif)
center repeat black;
} The element with an id attribute What type of elements are these? For those of you who haven't
come across them before they are elements with an id attribute,
and they are the main building blocks used in CSS page layouts. A
is simply a generic HTML block element. This means you can wrap
it around the different blocks of content you want to position on
your page, just as we've done here. We then give the different s
unique id tart
You are about to learn something about a subject over which
there is considerable debate, controversy and I'm sure even
fisticuffs in the world of ASS. The following is just one
person's opinion on the best way to set font size. There are many
others. Another way of looking at it is this: there is no one
true answer. I'm going to demonstrate setting font-size using the
em unit here because I think this makes for the most accessible
pages in the widest range of circumstances. If later on you are
convinced by the arguments for using another unit such as pixels
it's simply a matter of working with that new unit. Enough! On
with the show. 1. choose the unit in the popup menu on the right: in this case
em. The font-size property can take what is referred to in ASS as
length values. This means things like pixels, mm, cm and others.
But as discussed above, I prefer a unit particularly suited to
displaying fonts onscreen, the em. First up, I always set the
font-size on the body to 1em. This then means the final drawn
size of the body text will always be determined by the user's
preferred font size.
Exercise 11 Set the font-size for the whole page to 1em. You'll find the font-size editor directly under the font-family
editor. To set the font-size 2. type the value into the field on the left: in this case 1. And when you're done it should look like this. First word of warning.
- {block:Pages}
- {Label}
- {/block:Pages}
{Else}
{Title}
{block:Description}{Description}
{/block:Description} {/block:HeaderImage}Filed under: {Tag}
{block:ShowOnHover action_id="extra_links" hidden_div="global_tags"/} {/block:Tag} {block:SearchPage}{block:SearchResultOne}One result found searching for{/block:SearchResultOne} {block:SearchResultMany}{SearchResultCount} results found searching for{/block:SearchResultMany} {block:SearchResultNone}No results found searching for{/block:SearchResultNone}
- Sort by:
- {block:SearchSortBestmatch}Best match{Else}Best match{/block:SearchSortBestmatch}
- {block:SearchSortRecent}Most recent{Else}Most recent{/block:SearchSortRecent}
- {block:SearchSortInteresting}Most interesting{Else}Most interesting{/block:SearchSortInteresting}
- {block:Posts}
- {block:PostImage size='180' dimension='width'} {Else} {block:BodyExcerpt strip_tags="true"} {BodyExcerpt} {/block:BodyExcerpt} {/block:PostImage} {Title}
- {/block:Posts}
Private Post
This post has a secret URL and not linked on your public blog. Send the secret URL to share it with anyone.
{Title}
{/block:Title} {block:SMS} Posted from my mobile phone (SMS) {/block:SMS}by {AuthorName}
{/block:AuthorUser} {block:AuthorEmail}by email
{/block:AuthorEmail} {/block:Author} {block:PostLocations}from {LocationsSummary}
Posted from
- {block:PostLocation uniq_by="summary"}
- {LocationSummary}
- {/block:PostLocation}
Get Updates
{Label}
- {block:Links}
- {Label}
- {/block:Links}
Tags
- {block:TagListing collapsible="true" count="10" action_id="see_more_tags"} {block:TagListingMore}
- View all {NumTags} tags ↓
- {/block:TagListingMore} {block:TagItem}
- {TagName} ({TagCount})
- {/block:TagItem} {block:TagItemSelected}
- {TagName} ({TagCount})
- {/block:TagItemSelected} {/block:TagListing}
Archive
Contributors
- {block:Contributor collapsible="true" count="10" action_id="see_more_contributors"} {block:ContributorMore}
- View all {NumContributors} contributors »
- {/block:ContributorMore}
- {ContributorName}
- {/block:Contributor}
DOGMEAT "*dasniyasommer" plus 2 more *dasniyasommer Dasniya Sommer is coming! Is CSS gay? (see source) Input Using this tool --------------- This page lets you create HTML by entering text in a simple format that's easy to read and write. - Type Markdown text in the left window - See the HTML in the ...»See Ya
Finally invented 'Jamie Reid' *Sex Pistols Typography Ransom Style! Thanks CSS3!
I'm releasing it under the Open Font License here:'design is released under GPL:
...and thanks to ALA (A List Apart) for the lovely 'Max-Width' Post which I used during all 18 hours of experimentation.'
Finally invented 'Jamie Reid' *Sex Pistols Typography Ransom Style! Thanks CSS3!
The Parisian font embedded in this theme is by George Wilson, and is distributed under OFL (the Open Font License)
Going back, back to markup, markup
blockquote
, comfortably tucked into our blog article? Well, we've got way too much text on this darned page, so let's replace it with an inset image:<div class="figure"> <p> <img src="robot.jpg" alt="" /> <b class="figcaption">Lo, the robot walks</b> </p> </div>
img
element, followed by a brief but descriptive caption wrapped in a b
element. I'm actually appropriating the HTML5 figure
/figcaption
tags as class names in this snippet, which makes for a solidly semantic foundation.b
element for a non-semantic hook. Now, some designers might use a span
element instead. Me, I like the terseness of shorter tags like b
or i
for non-semantic markup.).figure { float: right; margin-bottom: 0.5em; margin-left: 2.53164557%; /* 12px / 474px */ width: 48.7341772%; /* 231px / 474px */ }
.figure
, the excess content simply overflows its container, and is visible to the user. There simply aren't any constraints applied to our image that could make it aware of its flexible environment.Fluid images
img { max-width: 100%; }
img
element will render at whatever size it wants, as long as it's narrower than its containing element. But if it happens to be wider than its container, then the max-width: 100%
directive forces the image's width to match the width of its container. And as you can see, our image has snapped into place.max-width: 100%
, we've prevented our image from escaping its flexible container. On a related note, I love max-width: 100%
.max-width: 100%
rule can also apply to most fixed-width elements, like video and other rich media. In fact, we can beef up our selector to cover other media-ready elements, like so:img, embed, object, video { max-width: 100%; }
img
, browsers do a fair job of resizing the content proportionally in a flexible layout. All thanks to our lightweight max-width constraint.max-width: 100%
, becoming flexible themselves. Did I mention I love max-width: 100%
?Because this job is never easy
max-width in Internet Explorer
max-width
property. IE7 version and above? Oh, it is positively brimming with support for max-width
. But if you're stuck supporting the (cough) venerable IE6 or lower, our approach needs refinement.max-width
support working in IE6. Most are JavaScript-driven, usually relying on Microsoft's proprietary expression filter to dynamically evaluate the width of an element, and to manually resize it if it exceeds a certain threshold. For an example of these decidedly non-standard workarounds, I'd recommend Svend Tofte's classic blog entry on the subject.max-width
constraint:img, embed, object, video { max-width: 100%; }
img, embed, object, video { width: 100%; }
width: 100%
, rather than the max-width: 100%
rule.max-width: 100%
instructs our images to never exceed the width of their containers, width: 100%
forces our images to always match the width of their containing elements.robot.jpg
image will always be larger than its containing element, so the width: 100%
rule works beautifully.img.full, object.full, .main img, .main object { width: 100%; }
width: 100%
rule to apply to every piece of fixed-width media in your page, we can simply write a list of selectors that target certain kinds of images or video (img.full
), or certain areas of your document where you know you'll be dealing with oversized media (.main img
, .main object
). Think of this like a whitelist: if images or other media appear on this list, then they'll be flexible; otherwise, they'll be fixed in their stodgy old pixel-y ways.width: 100%
rule can get those flexible images working beautifully. But with that bug sorted, we've still got one to go.In which it becomes clear that Windows hates us
robot.jpg
has gone from looking imposing to looking, well, broken). But this isn't a browser-specific issue as much as a platform-specific one: Windows doesn't scale images that well. In fact, when they're resized via CSS, images quickly develop artifacts on Windows, dramatically impacting their quality. And not in a good way.max-width: 100%
fix, while IE6 and below receive the width: 100%
workaround. Now, you'd never actually put this amount of text in an image. But it perfectly illustrates just how badly things can get in IE7 or lower. As you can see, the image looks-if you'll pardon the technical term-downright nasty.Hail AlphaImageLoader, the conquering hero
AlphaImageLoader
, one of Microsoft's proprietary CSS filters. There have since been more robust patches created for IE's lack of support for the PNG alpha channel (Drew Diller's DD_belatedPNG library is a current favorite of mine), but historically, if you had a PNG attached to an element's background, you could drop the following rule into an IE-specific stylesheet: (Line wraps marked » -Ed.).logo { background: none; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader» (src="/path/to/logo.png", sizingMethod="scale"); }
AlphaImageLoader
patch does a few things. First, it removes the background image from the element, then inserts it into an AlphaImageLoader
object that sits "between" the proper background layer and the element's content. But the sizingMethod
property is the clever bit, dictating whether the AlphaImageLoader object should crop any parts of the image that overflow its container, treat it like a regular image, or scale it to fit it within its containing element.AlphaImageLoader
to an image dramatically improves its rendering quality in IE, bringing it up to par with, well, every other browser on the planet. Furthermore, by setting the sizingMethod
property to scale
, we can use our AlphaImageLoader
object to create the illusion of a flexible image.AlphaImageLoader
objects.AlphaImageLoader
'll do ya.AlphaImageLoader
in particular, have some performance overhead associated with them-Stoyan Stefanov covers the pitfalls in more detail on the YUI blog. What does this mean for you? Just be sure to test the fix thoroughly on your site, gauge its effect on your users, and evaluate whether or not the improved rendering is worth the performance tradeoff.)max-width: 100%
fix in place (and aided by our width: 100%
and AlphaImageLoader
patches), our inset image is resizing beautifully across our target browsers. No matter the size of the browser window, our image scales harmoniously along with the proportions of our flexible grid.Flexibly tiled background images
.blog { background: #F8F5F2 url("blog-bg.png") repeat-y 50% 0; }
target ÷ context = result
.target ÷ context = result
formula comes into play yet again. We have our target value of 568px
, and the width of the design-our context-is 900px. And if we plug those two values into our stalwart formula:568 ÷ 900 = 0.631111111111111
63.1111111111111%
.160px
tall.63.1111111111111%
) to our new, wider canvas. So if we're working with a graphic that's 3000px
across, we simply need to multiply that width by the percentage, like so:3000 x 0.631111111111111 = 1893.333333333333
1893.333333333333
as our result. And since Photoshop doesn't deal in anything less than whole pixels, let's round that down to 1893 pixels. Armed with that number, we'll recreate our textures in our blank image, switching from white to gray at the 1893rd pixel.1893px
wide, with the gray column filling up the remainder..blog { background: #F8F5F2 url("blog-bg.png") repeat-y 63.1111111111111% 0; /* 568px / 900px */ }
repeat-y
). But the background-position
value reuses our transition point percentage (63.1111111111111% 0
), keeping the columns firmly in place as our design resizes itself.Fully flexible background images?
h1
element's background, or used sprites to create rollovers for your site's navigation. Can we resize images that need to live in the background?background-size
might not be available yet, the sky is, as the kids say, the limit. Theme Name: Beardsley
Description: A black and white art nouveau theme. Graphics are taken from the work of Aubrey Beardsley, the famous British illustrator associated with Oscar Wilde, among others. Try reloading the page to see a new border in the bottom corner of the page, from Beardsley's illuminations for the 1893 Dent edition of Mallory's 'King Arthur'
Author: Sash Lewis
Sash
Endless randomly chosen personal videos
- What is the Intubator?
- The Intubator distills YouTube down to its core: an endless stream of randomly selected, unedited personal videos. When one ends, another one will begin.
- Who made it?
- Hello. I'm Tom Scott. I live at tomscott.com. You can email me, follow me on Twitter, or subscribe to me on YouTube.
- What am I seeing?
- Videos that no-one bothered to tag, title, or describe: they're just assigned a random filename by the digital camera that recorded them. They might be from anyone, anywhere in the world, and be about anything - they're also not filtered, so be aware that some clips may be unsuitable for all audiences. These clips almost always have no views, no comments and no context, and you're one of the very few people to have seen them. You're welcome to try to find out more by clicking on the name, but it's usually fruitless.
- Can't I skip forward through them?
- Progress bars and arbitrary skips would spoil the effect. You can skip to an entirely new video if you must, by clicking the "Validate someone else's existence" link.
- I've been watching this for a while, and I'm feeling a bit weird.
- That's the realisation that you're just one solitary person among more than six billion on the planet hitting you.
- Damn.
- Bear in mind, though, that this isn't a representative sample of those billions: most of the clips you'll see here will be from the developed world and uploaded by those who can afford the luxuries of a digital camera and broadband internet access.
- Actually, it's not an existential crisis, I just feel a bit woozy.
- Get off your seat. Go for a walk. There's an entire planet out there, go and have a look at it with your own eyes instead of ruining them here.
- I think this is broken.
- It happens occasionally if YouTube's having issues. Come back in a few hours, and if it's still happening, email me. If you use FlashBlock, then you're right, it won't work for you: that's the trade-off for having rounded corners and a clickable canvas on the Flash player.
- Aren't these videos private?
- It might seem like some of them should be. But no - all these videos have been uploaded for public viewing. They've just not been tagged.
- I have another question!
- Email me. I'm friendly.
- Wed 6 Apr 2011
- 1711
- Books
CSS - 12 responses
- The backface-visibility property from the 3D Transforms module. This is one I'm already reconsidering, but I haven't found any indication that anyone besides Webkit will be picking it up in the near future. Still, I did document the rest of the 3D Transforms module so I may add this back in during the tech review stage.
rotation
androtation-point
from the CSS3 Box module. These have been effectively replaced by the 2D Transforms module, but the Box module hasn't been updated since that happened.- Everything in the Flexible Box Layout module. There are, as of now, just too many sections bearing notes, warnings, questions, and general feelings of instability and future change for me to feel comfortable including the properties from this module. I'm probably going to catch some flak for that.
- grid-columns and grid-rows from the Grid Positioning Module Level 3, which effectively means means excluding the entire module. Some day maybe I'll write a separate pocket reference just for the various CSS layout systems.
- font-stretch. Its continued exclusion saddens me, because I am exactly the sort of sheep-stealing lowlife who would programmatically stretch and compress font faces and like it, but so far as I can tell nobody's supporting the property. Alas.
- Basically, the entirety of the Generated Content for Paged Media module.
- The Behavioral Extensions module, which means the binding property as well as the
:bound-element
pseudo-class. - All the properties in CSS Marquee module. I'd love to see someone make a compelling case for re-instating them.
- The following properties from CSS Text Level 3:
hanging-punctuation
,punctuation-trim
,text-align-last
,text-emphasis-position
,text-emphasis-style
,text-emphasis
,text-justify
,text-outline
,text-wrap
,white-space-collapsing
, andword-break
. - The following properties from the Basic User Interface module, dated 2004:
appearance
,icon
,nav-down
,nav-left
,nav-right
,nav-up
, andnav-index
. - The Hyperlink Presentation module, dated 2004.
- The Presentation Levels module, dated 2003.
- move-to and crop from the CSS3 Generated and Replaced Content module, dated 2003.
- The Line module, dated 2002 and bearing my name for no reason I can recall. The one property listed there which I kept is
vertical-align
, and I just used the CSS2.1 definition.
Inconsistent Transitions
- Thu 24 Mar 2011
- 1624
- Browsers
CSS - 14 responses
div
causes the span
to animate a 270 degree rotation over one second, but when you unhover the div
the span
immediately snaps back to its starting position. In Opera 11, the span
is instantly transformed when you hover and instantly restored to its starting position when you unhover.div
triggers a one-second 270-degree rotation of the span
. Unhovering causes the rotation animation to be reversed; that is, a one-second minus-270-degree rotation-or, if you mouseout from the div
before the animation finishes, an rotation from that angle back to the starting position. Either way, it's completely consistent across browsers.div:hover span { transition: 1s transform; transform: rotate(270deg); }
div span { transition: 1s transform; } div:hover span { transform: rotate(270deg); }