[CSS: text-indent] Implement 'each-line' and 'hanging'

NEW
Unassigned

Status

()

Core
CSS Parsing and Computation
--
enhancement
5 years ago
5 months ago

People

(Reporter: George, Unassigned)

Tracking

(Blocks: 1 bug, {css3})

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:14.0) Gecko/20100101 Firefox/14.0.1
Build ID: 20120713134347

Steps to reproduce:

Authors commonly want to add a text-indent on each paragraph of their writing.
(This is natural to anyone who composes documents in a page-based text editor)
To achieve this stylistic result, authors currently have to insert HTML code to delineate their paragraphs.

An author will, for example, write:

HTML
<article id=container>
<p>First paragraph ...</p>
<p>Second paragraph ...</p>
<p>Third paragraph ...</p>
</article>

CSS
p {text-indent: 2em;}

This unnecessarily pollutes the DOM with excess elements. Authors rarely plan to style each paragraph individually (beyond the current limitation of text-indent).

But, with text-indent: each-line implemented, an author could write the much simpler:

<article id=container>
First paragraph <br>
Second paragraph <br>
Third paragraph <br>
</article>

article {text-indent: 2em each-line}

Of course, if there is a practical reason to denote each paragraphs' start /end (JavaScript manipulation, linking through ids etc), the old way of adding markup would still be valid. But this is usually the exception, not the rule.

Interested readers can view the specification here:
http://www.w3.org/TR/css3-text/#text-indent0

Thank you for your time.

Updated

5 years ago
Component: Untriaged → Style System (CSS)
Product: Firefox → Core

Updated

5 years ago
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: css3
OS: Mac OS X → All
Hardware: x86 → All
Version: 14 Branch → unspecified

Comment 1

4 years ago
There's also `text-indent: (value) hanging` and the combination of both. This bug should probably cover both as they are supplementary.

Updated

4 years ago
Blocks: 913153
According to comment 3 the title of this issue should probably be changed to include 'hanging'.

Sebastian
> According to comment 3
Of course I meant comment 1.

Sebastian
Summary: [CSS: text-indent] Implement each-line → [CSS: text-indent] Implement 'each-line' and 'hanging'
You need to log in before you can comment on or make changes to this bug.