Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document new svh/svw, lvh/lvw, dvh/dvw etc. viewport-percentage relative length units #16679

Merged
merged 3 commits into from May 27, 2022

Conversation

dipikabh
Copy link
Contributor

Summary

  • In Firefox release 101, new viewport sizes have been introduced: small (s), large (l), and dynamic (d).
    As a result, the existing viewport-percentage length units (vw, vh, vmin, vmax) can have more variants.
    Each can be of the type s, l, d resulting in:
    svw, lvw, dvw,
    svh, lvh, dvh,
    svmin, lvmin, dvmin,
    svmax, lvmax, dvmax
  • vw, vh, vmin, vmax were already documented on this page (these are now considered the browser defaults).
    This PR adds a section to explain small (s), large (l), and dynamic (d) viewport sizes and also adds info about the new variants in the respective vw, vh, vmin, vmax sections.
  • Additionally, in this PR:
    • Minor edits have been made to the rest of the page to improve clarity and some more info from the spec has been added like specified and computed lengths

    • The existing page had heading levels going up to <h5> in the Syntax section. This has been fixed to avoid going below the heading level <h3>.
      Current structure:
      ## Syntax
      ### Units
      #### Relative length units
      ##### Font-relative lengths
      ##### Viewport-percentage lengths
      #### Absolute length units

      New structure in this PR:
      ## Syntax
      The length units can be relative or absolute.
      The relative length units listed here are based on font and viewport.
      ### Relative length units based on font
      ### Relative length units based on viewport
      ### Absolute length units

Motivation

https://drafts.csswg.org/css-values/#viewport-relative-lengths

Supporting details

https://bugzilla.mozilla.org/show_bug.cgi?id=1610815

Related issues

Doc issue tracking this work: #15465

Metadata

  • Adds a new document
  • Rewrites (or significantly expands) a document
  • Fixes a typo, bug, or other error

@dipikabh dipikabh requested a review from a team as a code owner May 26, 2022 07:47
@dipikabh dipikabh requested review from estelle and removed request for a team May 26, 2022 07:47
@github-actions github-actions bot added the Content:CSS Cascading Style Sheets docs label May 26, 2022
@dipikabh dipikabh requested a review from Rumyra May 26, 2022 07:48
@github-actions
Copy link
Contributor

github-actions bot commented May 26, 2022

Preview URLs

Flaws

None! 🎉

External URLs

URL: /en-US/docs/Web/CSS/length
Title: <length>
on GitHub

(this comment was updated 2022-05-26 20:34:10.491909)

files/en-us/web/css/length/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/length/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/length/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/length/index.md Outdated Show resolved Hide resolved
@Rumyra
Copy link
Collaborator

Rumyra commented May 26, 2022

Looks great @dipikabh - some really good improvements 👍

@Rumyra Rumyra removed the request for review from estelle May 26, 2022 15:16
@dipikabh dipikabh requested review from estelle and Rumyra May 26, 2022 20:34
@dipikabh
Copy link
Contributor Author

Looks great @dipikabh - some really good improvements 👍

Thanks for the quick turnaround with the review, @Rumyra!

@dipikabh dipikabh changed the title Document for new svh/svw, lvh/lvw, dvh/dvw etc. viewport-percentage relative length units Document new svh/svw, lvh/lvw, dvh/dvw etc. viewport-percentage relative length units May 27, 2022
@Rumyra Rumyra merged commit d97343d into mdn:main May 27, 2022
@dipikabh dipikabh deleted the ff-length-new-units branch June 16, 2022 16:16
@bsmth bsmth added fx release archive A closed issue relating to firefox release notes for developers. and removed Firefox 101 labels Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:CSS Cascading Style Sheets docs fx release archive A closed issue relating to firefox release notes for developers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants