From 73e60610043f8450cd126b852e54377ddea87bea Mon Sep 17 00:00:00 2001 From: Taylor Stauss <15224340+ttstauss@users.noreply.github.com> Date: Fri, 9 Nov 2018 00:24:01 -0700 Subject: [PATCH] CSS: ADD ::first-line pseudo-element document (#21291) * CSS: ADD ::first-line pseudo-element document * fix links, they were mistitled --- .../css/selectors/pseudo/first-line/index.md | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 guide/english/css/selectors/pseudo/first-line/index.md diff --git a/guide/english/css/selectors/pseudo/first-line/index.md b/guide/english/css/selectors/pseudo/first-line/index.md new file mode 100644 index 0000000000..5c96351b37 --- /dev/null +++ b/guide/english/css/selectors/pseudo/first-line/index.md @@ -0,0 +1,28 @@ +--- +title: First-Line +--- +## First-Line + +The ```::first-line``` CSS pseudo-element styles the first line of a selected HTML element. + +General Syntax: + +```css +::first-line +``` + +## Example + +```css +/* "First line of every paragraph is set to bold*/ +p::first-line { + font-weight: bold; +} +``` + +The ```::first-line``` CSS pseudo-element is often paired with the ```::first-letter``` CSS pseudo-element for a drop caps effect emphasizing the first letter and line of a paragraph. + +#### More Information: +* [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/CSS/::first-line) +* [W3 Schools](https://www.w3schools.com/cssref/sel_firstline.asp) +* [CSS Tricks](https://css-tricks.com/almanac/selectors/f/first-line/)