Skip to content

Instantly share code, notes, and snippets.

@dirtandrust
Created March 28, 2019 21:21
Show Gist options
  • Select an option

  • Save dirtandrust/6355161cc738a6b6cf47c0e5cec7367d to your computer and use it in GitHub Desktop.

Select an option

Save dirtandrust/6355161cc738a6b6cf47c0e5cec7367d to your computer and use it in GitHub Desktop.

Revisions

  1. dirtandrust created this gist Mar 28, 2019.
    22 changes: 22 additions & 0 deletions text-overflow.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    /* Overflow behavior at line end
    Right end if ltr, left end if rtl */
    text-overflow: clip;
    text-overflow: ellipsis;
    text-overflow: "…";

    /* Overflow behavior at left end | at right end
    Directionality has no influence */
    text-overflow: clip ellipsis;
    text-overflow: "…" "…";

    /* Global values */
    text-overflow: inherit;
    text-overflow: initial;
    text-overflow: unset;

    p {
    white-space: nowrap;
    width: 100%;
    overflow: hidden; /* "overflow" value must be different from "visible" */
    text-overflow: ellipsis;
    }