Subscribe to RSS feed

Posts tagged with "CSS"

Build dynamic Web presentations without Flash

, , , ...

Just a week ago Chris Mills said that he is "planning a series of articles to show that you can really do all Flash type stuff using open standards". He also asked thoughts on what to cover. And in a couple days I stumble upon Flash photo portfolio presentation in New Yorker magazine and decided to convert it to standards. It looked pretty doable with CSS and JavaScript to me, so I decided to go with CSS-only, because I'm interesting in trying out some upcoming CSS3 goodies.

If you don't want to go into implementation details, here is a demo (alternative link). Sorry for stupid My Opera nag screen, no harm will be provided to you or your computer. Also you will need Google Chrome 4 or Safari 4 or Firefox 4 or Opera with Presto 2.3+ engine.

So, I started with examining the Flash presentation sample. Thankfully it appears that creators separated data (XML and pictures) from presentation (Flash), so anyone can pretty easily create their own implementation.

To locally saved XML I applied small XSL, that generated HTML markup for presentation, and that was pretty straightforward.

Here is most interesting part of HTML structure:
<div id="name">
  <div id="country">
    <div id="age">
      <div id="gender">
        <div id="tenure">
          <p id="menu">Order by:
            <a href="#name" id="menu-name">Name</a>
            <a href="#country" id="menu-country">Country</a>
            <a href="#age" id="menu-age">Age</a>
            <a href="#gender" id="menu-gender">Gender</a>
            <a href="#tenure" id="menu-tenure">Tenure</a>
          </p>
          <ul> 
            <li>...</li>
            <li>...</li>
            ...
          </ul>
        </div>
      </div>
    </div>
  </div>
</div>

Now it was CSS turn. In two words: using :target pseudo-class I was able to switch sorting of photos, using CSS3 transitions I was able to show "visual sorting" and smooth fade-in-out effects. To show big pictures I decided to use :active pseudo-class (user needs to hold mouse button on a thumbnail). From CSS3 I also used RGBA and box-shadow.

Here is an example of current CSS nightmare that we need to write in order to get all current and future browsers on board:
-webkit-transition-property: opacity;
-webkit-transition-duration: .6s;
-webkit-transition-delay: .6s;
-moz-transition-property: opacity;
-moz-transition-duration: .6s;
-moz-transition-delay: .6s;
-o-transition-property: opacity;
-o-transition-duration: .6s;
-o-transition-delay: .6s;
transition-property: opacity;
transition-duration: .6s;
transition-delay: .6s;

Once CSS3 transitions module will become a recommendation, we will need to add properties without vendor prefixes.

That is pretty much it. This CSS-only demo doesn't cover all functionality of original presentation, but sure that is 100% doable if we add some JavaScript and any technology to play audio files.

I tested this demo in Google Chrome 4, Apple Safari 4, and Mozilla Firefox 3.7 builds. Firefox seems has some glitches with CSS transitions, but it is useful even in this state. I added -o- prefixes, so someone can test this on Opera Mobile 10 (Presto 2.3) or next Opera for desktop (Presto 2.4).

Any comments, suggestions and corrections are welcome.

Table, Safari, CSS

, , , ...

It's just stupid! scared Safari propogates CSS border property from table to tbody.
And you can't change border for tbody than...
Stupidity rating: bug bug bug bug bug

My list of questions to Håkon Wium Lie

, , ,

I finally managed myself to write some questions to Opera Bits:
  • Håkon, what your expectations about finalizing recomendation of CSS 3 Selectors? Can we hope to see most of them working in upcoming Opera 9?
  • What your predictions about which next modules of CSS 3 will/should be finalized first? And when expect implementation of them in Opera?
  • Which modules of CSS 3 do you think most complicated to specify and implement?
  • Will/can CSS 3 compete with XSLFO when it available?
  • How often you update your "home" version of Opera? Every release, beta, TP, weeky, internal build? bigsmile

My accessible tab-based dynamic menu

, , , ...

First public preview... cool
First bugs in Opera (8 and 9)... bigeyes
Take a look at accessible CSS + JS navigation.
Update 1: Now works without JavaScript enabled (use style with name "Thick Border no JS", doesn't work in IE). This changes also help to fix Opera 8 and 9 TP1 buggy repaint behaviour a bit.
Update 2: New version of tab-based menu, where repainting bug in Opera 8 and 9 has been fixed.
Also I changed default style a little.

New Firefox 1.5 has some CSS rendering regression bugs

, , , ...

Test this page in different browsers. Seems than in this particular case Firefox 1.5 doesn't get clear:left on the DL elements.
Update: Ok. Clearing floats inside FIELDSET doesn't work in Firefox 1.5. This bug was known before Firefox 1.5 release. They just left it in a hurry because:

Even though it is a regression, the impact is minor we are very close to lockdown for rc2 so it looks like it is not going to make it.

I hate regressions in CSS! furious

New One True Layot Will Rule the World

, , , ...

Wery well written dissertation on modern CSS based layot technique by Alex Robinson.
Now he added remarks inspired by me called "not so basic". wink

Clearing Floats with Position Relative Bug in Opera 9 TP1

, , , ...

Just tested some of my intranet pages where I have fieldsets with applied CSS style overflow:hidden for clearing floating elements inside fieldset - and in Opera 9 TP1 it doesn't clear anything and do weired things.
Just one more thing to make it broken - add position:relative in addition to overflow:hidden.
This bug appears to be not connected to only fieldsets it also "works" with DIVs too.
I also create separate test page for it.
Also notice the missing top border on the legends for fieldsets, and weird position of header "DIVs".
This test page also shows bug fixes in Opera 9 related to margins (there should be no bottom margin under first fieldset and first div). up

One True Layout™ Works Without Hacks in Opera 9

, ,

Great article about universal CSS layout technique - One True Layout™.
All examples now work fine in Opera 9 TP1.
Anyway, don't forget to check browser results for the examples and methods before implementing this great layout.
Also I want to try how this layout will work with Dean's Edwards IE7.

Great Stuff in Opera 9

, , , ...

Site-Specific Stylesheets explained .

Malevich Black Square in Opera

, , , ...

Today I want to present one of my favourite Opera bugs in fun way. And because I see this bug during around 3 years (since first Opera 7 beta appears) I want to give this beatiful bug his own name - Malevich Black Square bug. bigsmile

So, first of all test page where we can see four Acid Smiles smile Two of them (first and third) are images and other two are DIVs with image set as background.
Now funny part. Where Malevich Square here? Just change zoom on the page in your Opera browser or print out the page (needs Print Page Background option checked).
Last Acid Smile now will appears as black square! bigeyes
I investigate this bug and found that it appears only if GIF image
  • has only black color and transparency
  • puts as background
  • need to be smaller than 64x64 px

Have fun! bigsmile

Also read forum post about this bug.
Bug reports collection: #198211, #198161, #126808, and one more I filled myself long time ago but forgot the number...

Test suites: 1, 2, 3

Read more...

February 2012
M T W T F S S
January 2012March 2012
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29