What is the use and how to use the hanging-punctuation property of CSS?

7

I know that the hanging-punctuation property provides control over typography on the web, but I do not really know what this control is and how it works. I've also seen that the property supports some values, such as first , last , force-end , and others, but honestly I see no difference between them and examples.

Questions

  • What is the control that property offers over typography?
  • What are the differences between the major accepted values?
  • What is its usefulness and why should we use it (if we should)?
  • Is the property supported by many browsers?
  • Is it used? If yes, how?
  • asked by anonymous 19.10.2018 / 15:15

    1 answer

    0

    The CSS property specifies whether a punctuation mark should be stopped at the beginning or end of a line of text. hanging-punctuation The suspended score can be placed outside the line box.

    /* Keyword values */
    hanging-punctuation: none;
    hanging-punctuation: first;
    hanging-punctuation: last;
    hanging-punctuation: force-end;
    hanging-punctuation: allow-end;
    
    /* Two keywords */
    hanging-punctuation: first force-end;
    hanging-punctuation: first allow-end;
    hanging-punctuation: first last;
    hanging-punctuation: last force-end;
    hanging-punctuation: last allow-end;
    
    /* Three keywords */
    hanging-punctuation: first force-end last;
    hanging-punctuation: first allow-end last;
    
    /* Global values */
    hanging-punctuation: inherit;
    hanging-punctuation: initial;
    hanging-punctuation: unset;
    

    Syntax

    The hanging-punctuation property can be specified with one, two, or three values.

    The syntax of a value uses any of the keyword values in the list below. The two-valued syntax uses one of the following: firstem set with any of last, allow-endouforce-end together with any of first, allow-endouforce-end The three-valued syntax uses one of the following: first, allow-endelast first, force-endelast

    Example: CodePen

    Compatibility

    SearchSource: MDB Web Docs

    Enter search source for more information.

        
    02.11.2018 / 19:37