- From: Koji Ishii <kojiishi@gluesoft.co.jp>
- Date: Tue, 28 Oct 2014 20:26:30 +0000
- To: www-style list <www-style@w3.org>
Never mind, I found we can do this today[1]. I’ll respond back to the questioner. [1] http://codepen.io/kojiishi/pen/fwAdn/ /koji On Oct 28, 2014, at 6:22 PM, Koji Ishii <kojiishi@gluesoft.co.jp> wrote: > An author asked me if it’s possible to right align if single line, otherwise left align. > > She creates a list of quoted articles, and each article has its source like this: > > ``` > Multiple lines of text text text... > - New York Times, Oct 28th, 2014 > ``` > > She wants the source line be right aligned if single line, but she wants left aligned if more than single line because using right align to multiple lines for this purpose does not look good. > > She thought she can do this by: > text-align: left; > text-align-last: right; > but since text-align-last applies not only to single line but also the last line of multiple lines, it doesn’t work as she expected. > > One idea to solve this is to introduce a pseudo selector for single line. I first thought it’s not great, since when such selector makes font size smaller and the new result fit into single line, that’s a source of troubles, but then I find we already have :blank, which could be in similar situation if author sets the content property, so I’m guessing it’s a needless fear. > > The other idea is to add the text-align-single property. I merely remember I had a discussion on this with someone but don’t remember well. > > Thoughts? Other ideas to solve this better? > > /koji > >
Received on Tuesday, 28 October 2014 20:27:03 UTC