CSS text-align-all
Obsolete
The text-align-all property was proposed in early drafts of the CSS Text Module Level 3, but has since been abandoned and removed from the specification.
To align text, use the text-align property instead.
The text-align-all property was intended to be a longhand for the text-align property.
Here's an explanation from the CSSWG regarding why it was proposed and ultimately dropped:
There's a proposal for ‘text-align’ to become a shorthand for ‘text-align-last’ and ‘text-align-all’. This has the advantage that ‘text-align-last’ can be set in a single declaration with ‘text-align’, e.g. ‘text-align: justify-all’ (justify align all lines) or ‘text-align: justify center’ (justify all lines except center last line). It has the disadvantage of creating the ‘text-align-all’ property. There are also some cascading considerations: if ‘text-align-last’ is part of the shorthand, then any declaration of ‘text-align’ will reset it; it's unclear if this is an advantage or a disadvantage.
Therefore, this article is here to provide context, and for historical completeness, rather than working examples.
Syntax
Possible Values
start- Specifies that inline-level content is aligned to the start edge of the line box.
end- Specifies that inline-level content is aligned to the end edge of the line box.
left- Specifies that inline-level content is aligned to the line left edge of the line box. (In vertical writing modes, this will be either the physical top or bottom, depending on the value of the
text-orientationproperty.) right- Specifies that inline-level content is aligned to the line right edge of the line box. (In vertical writing modes, this will be either the physical top or bottom, depending on the value of the
text-orientationproperty.) center- Specifies that inline-level content is centered within the line box.
justify- Specifies that text is justified according to the method specified by the
text-justifyproperty, in order to exactly fill the line box. match-parent- This value behaves the same as
inherit(computes to its parent's computed value) except that an inheritedstartorendkeyword is interpreted against its parent'sdirectionvalue and results in a computed value of eitherleftorright.
In addition, all CSS properties also accept the following CSS-wide keyword values as the sole component of their property value:
initial- Represents the value specified as the property's initial value.
inherit- Represents the computed value of the property on the element's parent.
unset- This value acts as either
inheritorinitial, depending on whether the property is inherited or not. In other words, it sets all properties to their parent value if they are inheritable or to their initial value if not inheritable.
Basic Property Information
- Initial Value
start- Applies To
- Block containers.
- Inherited?
- Yes
- Animatable
- Discrete
CSS Specifications
- The
text-align-allproperty was defined in early drafts of the CSS Text Module Level 3, but has since been abandoned and is obsolete.
Browser Support
Browser support for CSS properties can vary, particularly for newer or experimental features. Check current browser compatibility before using a property in production, especially when supporting older browsers.
Initial Value
CSS properties have an initial value that applies when the property has not been explicitly set. The initial value is different from the value inherited from a parent element and may vary between properties.
Inheritance
Some CSS properties inherit their computed value from their parent element by default, while others do not. The inherit, initial, unset, and revert keywords can also be used to control how a property gets its value.
Vendor Prefixes
Most modern CSS properties use the standard, unprefixed syntax. Vendor-prefixed properties such as -webkit- are mainly relevant to older browser versions or specific features and should only be used when required by your browser support targets.