Tags: border

13

sparkline

Saturday, September 17th, 2022

A long-term plan for logical properties? | Miriam Eric Suzanne

Well, now I’m really glad I wrote that post about logical properties!

We’re not there yet. So how do we get there?

Well, I don’t know for sure – but articles like this are very helpful as we try to work it out!

Thursday, September 15th, 2022

Let’s get logical

I was refactoring some CSS on The Session over the weekend. I thought it would be good to switch over to using logical properties exclusively. I did this partly to make the site more easily translatable into languages with different writing modes, but mostly as an exercise to help train me in thinking with logical properties by default.

All in all, it went pretty smoothly. You can kick the tyres by opening up dev tools on The Session and adding a writing-mode declaration to the body or html element.

For the most part, the switchover was smooth. It mostly involved swapping out property names with left, right, top, and bottom for inline-start, inline-end, block-start, and block-end.

The border-radius properties tripped me up a little. You have to use shorthand like border-start-end-radius, not border-block-start-inline-end-radius (that doesn’t exist). So you have to keep the order of the properties in mind:

border-{{block direction}}-{{inline-direction}}-radius

Speaking of shorthand, I also had to kiss some shorthand declarations goodbye. Let’s say I use this shorthand for something like margin or padding:

margin: 1em 1.5em 2em 0.5em;

Those values get applied to margin-top, margin-right, margin-bottom, and margin-left, not the logical equivalents (block-start, inline-end, block-end, and inline-start). So separate declarations are needed instead:

margin-block-start: 1em;
margin-inline-end: 1.5em;
margin-block-end: 2em;
margin-inline-start: 0.5em;

Same goes for shorthand like this:

margin: 1em 2em;

That needs to be written as two declarations:

margin-block: 1em;
margin-inline: 2em;

Now I’ve said it before and I’ll say it again: it feels really weird that you can’t use logical properties in media queries. Although as I said:

Now you could rightly argue that in this instance we’re talking about the physical dimensions of the viewport. So maybe width and height make more sense than inline and block.

But along comes the new kid on the block (or inline), container queries, ready to roll with container-type values like inline-size. I hope it’s just a matter of time until we can use logical properties in all our conditional queries.

The other place where there’s still a cognitive mismatch is in transforms and animations. We’ve got a translateX() function but no translate-inline(). We’ve got translateY() but no translate-block().

On The Session I’m using some JavaScript to figure out the details of some animation effects. I’m using methods like getBoundingClientRect(). It doesn’t return logical properties. So if I ever want to adjust my animations based on writing direction, I’ll need to fork my JavaScript code.

Oh, and one other thing: the aspect-ratio property takes values in the form of width/height, not inline/block. That makes sense if you’re dealing with images, videos, or other embedded content but it makes it really tricky to use aspect-ratio on elements that contain text. I mean, it works fine as long as the text is in a language using a top-to-bottom writing mode, but not for any other languages.

Monday, October 22nd, 2018

CSS Border-Radius Can Do That? | IO 9elements

This is the trick that Charlotte used to get the nifty blobby effect on last year’s UX London site. Now there’s a tool to help you do the same.

Saturday, February 25th, 2017

Social Media Needs A Travel Mode (Idle Words)

We don’t take our other valuables with us when we travel—we leave the important stuff at home, or in a safe place. But Facebook and Google don’t give us similar control over our valuable data. With these online services, it’s all or nothing.

We need a ‘trip mode’ for social media sites that reduces our contact list and history to a minimal subset of what the site normally offers.

Saturday, May 30th, 2015

The Village and The Village

In which Dan simultaneously goes to the Netherlands and Belgium in a Miévillian sort of way.

Have a listen to the dConstruct 2011 talk from Kars for context.

Wednesday, November 12th, 2014

Living on the Electromagnetic Border

Continuous partial City And The City, courtesy of James.

Those of us who reside on the “right” side of fixed, physical borders seem to cross the electromagnetic border every day, whether overtly, by entering the right passwords and credit card numbers, or covertly, as when using VPNs to watch TV programs viewable only in other territories. Those on the “wrong” side are subjected to a different but analogous battery of tests, intensifying at the physical border but often carried out far from it, in networked enclaves or foreign transit zones or aboard floating teleconference platforms in international waters.

Saturday, April 12th, 2014

Designing in the Borderlands by Frank Chimero

This is a wonderful piece of writing and thinking from Frank. A wonderful piece of design, then.

A personal view on generalists and trans-media design

Saturday, November 23rd, 2013

Jeremy Keith – The Power Of Simplicity – border:none

This is the talk I gave at the border:none event in Nuremberg last month. I really enjoyed it. This was a chance to gather together some thoughts I’ve been mulling over for a while about how we approach front-end development today …and tomorrow.

Warning: it does get quite ranty towards the end.

Also: it is only now that the video is released that I see I spent the entire talk looking like a dork with a loop of wire sticking out of the back of my head.

Saturday, October 26th, 2013

Medieval times

I just got back from Nürnberg where I gave the closing talk at the cheap’n’cheerful border:none event. It was my first time in Nürnberg and I wish I could’ve stayed longer in such a beautiful place. I would’ve liked to stick around for today’s Open Device Lab admin meetup, but alas I had to get up at the crack of dawn to start making my way back to Brighton.

I was in Germany last month too. That time I was in Freiburg, where I was giving the closing talk at Smashing Conference. That was a lot of fun:

So I threw away my slidedeck and went Keynote commando.

The video from that slideless talk is up on Vimeo now for your viewing and/or downloading pleasure.

If you watch it through to the end, then you’ll know why I could be found immediately afterwards showing people some centuries-old carvings on Freiburg’s cathedral.

Jeremy playing tour guide Bread standards

Update: I’ve published a transcript of the talk.

Wednesday, August 14th, 2013

August in America, day eleven

Sierra Vista is located just a few miles to north of Mexico. If you’re driving up to Benson or Tucson, you can expect to be stopped by the border police. Please have your papers ready for inspection.

Border patrol check point, 1 mile

Most days, a tethered unmanned blimp hovers over the mountains to the south of Sierra Vista. On some nights, you can see the light of a drone traversing the air above the border.

Sierra Vista is also home to an army base, hence the occasional helicopters and aircraft.

Tomorrow we leave for San Diego, right next to the border with Tijuana.

Wednesday, February 1st, 2012

* { box-sizing: border-box } FTW « Paul Irish

Paul quite rightly sings the praises of box-sizing: border-box — this is something that Microsoft got right and the spec got wrong. I never thought of making it part of a universal reset though.

Monday, April 5th, 2010

border-image-generator - In Case of Stairs

A very handy GUI for figuring out the somewhat complicated syntax of border-image in CSS3.

Tuesday, March 2nd, 2010

CSS Border Radius

A handy shortcut for when you just can't recall the exact syntax of border-radius.