mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
style: Make word-break: break-word behave like word-break: normal; overflow-wrap: anywhere.
Differential Revision: https://phabricator.services.mozilla.com/D21398
This commit is contained in:
parent
7d01114cbf
commit
9e0d38a64f
8 changed files with 36 additions and 7 deletions
|
@ -78,7 +78,7 @@ pub use self::svg::{SVGLength, SVGOpacity, SVGPaint, SVGPaintKind};
|
|||
pub use self::svg::{SVGPaintOrder, SVGStrokeDashArray, SVGWidth};
|
||||
pub use self::table::XSpan;
|
||||
pub use self::text::{InitialLetter, LetterSpacing, LineHeight};
|
||||
pub use self::text::{OverflowWrap, TextOverflow, WordSpacing};
|
||||
pub use self::text::{OverflowWrap, TextOverflow, WordSpacing, WordBreak};
|
||||
pub use self::text::{TextAlign, TextEmphasisPosition, TextEmphasisStyle};
|
||||
pub use self::time::Time;
|
||||
pub use self::transform::{Rotate, Scale, Transform, TransformOperation};
|
||||
|
|
|
@ -17,7 +17,7 @@ use crate::values::{CSSFloat, CSSInteger};
|
|||
use std::fmt::{self, Write};
|
||||
use style_traits::{CssWriter, ToCss};
|
||||
|
||||
pub use crate::values::specified::OverflowWrap;
|
||||
pub use crate::values::specified::{OverflowWrap, WordBreak};
|
||||
pub use crate::values::specified::TextAlignKeyword as TextAlign;
|
||||
pub use crate::values::specified::TextEmphasisPosition;
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ pub use self::svg::{SVGPaintOrder, SVGStrokeDashArray, SVGWidth};
|
|||
pub use self::svg_path::SVGPathData;
|
||||
pub use self::table::XSpan;
|
||||
pub use self::text::{InitialLetter, LetterSpacing, LineHeight, TextAlign};
|
||||
pub use self::text::{OverflowWrap, TextEmphasisPosition, TextEmphasisStyle};
|
||||
pub use self::text::{OverflowWrap, TextEmphasisPosition, TextEmphasisStyle, WordBreak};
|
||||
pub use self::text::{TextAlignKeyword, TextDecorationLine, TextOverflow, WordSpacing};
|
||||
pub use self::time::Time;
|
||||
pub use self::transform::{Rotate, Scale, Transform};
|
||||
|
|
|
@ -813,6 +813,32 @@ impl From<TextEmphasisPosition> for u8 {
|
|||
}
|
||||
}
|
||||
|
||||
/// Values for the `word-break` property.
|
||||
#[repr(u8)]
|
||||
#[derive(
|
||||
Clone,
|
||||
Copy,
|
||||
Debug,
|
||||
Eq,
|
||||
MallocSizeOf,
|
||||
Parse,
|
||||
PartialEq,
|
||||
SpecifiedValueInfo,
|
||||
ToComputedValue,
|
||||
ToCss,
|
||||
)]
|
||||
#[allow(missing_docs)]
|
||||
pub enum WordBreak {
|
||||
Normal,
|
||||
BreakAll,
|
||||
KeepAll,
|
||||
/// The break-word value, needed for compat.
|
||||
///
|
||||
/// Specifying `word-break: break-word` makes `overflow-wrap` behave as
|
||||
/// `anywhere`, and `word-break` behave like `normal`.
|
||||
BreakWord,
|
||||
}
|
||||
|
||||
/// Values for the `overflow-wrap` property.
|
||||
#[repr(u8)]
|
||||
#[derive(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue