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

docs(css): Create easing function pages #36697

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

dipikabh
Copy link
Contributor

@dipikabh dipikabh commented Nov 9, 2024

Description

Currently, the documentation for linear(), cubic-bezier(), and steps() easing functions exists only within the <easing-function> data type page.

This PR:

  • Creates individual reference pages for linear(), cubic-bezier(), and steps() functions from the content on the <easing-function> page.

  • Updates the <easing-function> page:

    • Moves the function details from the "Description" section to the respective function pages.
    • Moves relevant examples to the respective function pages.
    • Aligns the "Values" section with the "Formal syntax" section (retains the definition of the function keywords here).
  • Similarly, aligns the "Parameters" section on each function page with its "Formal syntax".

  • The "Specifications" section is being updated in Add spec_url for new CSS easing functions browser-compat-data#25041.

Note

This is the first iteration of the function pages. Future improvements can include:

  • Adding interactive examples and more code snippets to the "Examples" section
  • Checking the content against the specification to ensure coverage on MDN

Related issues and pull requests

Fixes #29923

@dipikabh dipikabh requested review from a team as code owners November 9, 2024 04:32
@dipikabh dipikabh requested review from pepelsbey and estelle and removed request for a team November 9, 2024 04:32
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs Content:Glossary Glossary entries Content:Firefox Content in the Mozilla/Firefox subtree size/l [PR only] 501-1000 LoC changed labels Nov 9, 2024
@dipikabh dipikabh changed the title Split easing function docs(css): Create easing function pages Nov 9, 2024
Copy link
Contributor

github-actions bot commented Nov 9, 2024

Preview URLs (7 pages)
External URLs (7)

URL: /en-US/docs/Mozilla/Firefox/Releases/65
Title: Firefox 65 for developers


URL: /en-US/docs/Web/CSS/easing-function
Title: <easing-function>


URL: /en-US/docs/Web/CSS/easing-function/cubic-bezier
Title: cubic-bezier()


URL: /en-US/docs/Web/CSS/easing-function/steps
Title: steps()


URL: /en-US/docs/Web/CSS/easing-function/linear
Title: linear()

(comment last updated: 2024-11-22 14:46:16)

Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot removed the merge conflicts 🚧 [PR only] label Nov 12, 2024
Copy link
Member

@pepelsbey pepelsbey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done! Thanks :) I have one fix and a few suggestions:

  • Quotes inside of alts might not be useful for the target users or even potentially problematic since we encode them.
  • The alt descriptions we provide for graphs might not be comprehensible due to their complexity and length. I wonder if we should reconsider the approach and explain them in prose next to images.

Here’s the longest example:

Graphs of Input progress to Output progress, of which steps(2, jump-start) shows horizontal lines extending 0.5 unit from (0, 0.5) and (0.5, 1), respectively, with empty circles at the origin and (0.5, 0.5); steps(4, jump-end) shows horizontal lines extending 0.25 unit from (0, 0), (0.25, 0.25), (0.5, 0.5), and (0.75, 0.75), respectively, with unfilled circles at (0.25, 0), (0.5, 0.25), and (0.75, 0.5), and a solid circle at (1, 1); steps(5, jump-none) shows horizontal lines extending 0.2 unit from (0, 0), (0.2, 0.25), (0.4, 0.5), (0.6, 0.75), and (0.8, 1), respectively, with unfilled circles at (0.2, 0), (0.4, 0.25), (0.6, 0.5), and (0.8, 0.75); steps(3, jump-both) shows horizontal lines extending 1/3 unit from (0, 0.25), (1/3, 0.5), and (2/3, 0.75),respectively , with a solid circle at (1, 1) and unfilled circles at the origin, (1/3, 0.25), (2/3, 0.5), and (1, 0.75).

Describing this picture:

image

We might also split the picture in multiple parts and describe each individually.

files/en-us/web/css/easing-function/cubic-bezier/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/easing-function/cubic-bezier/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/easing-function/cubic-bezier/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/easing-function/cubic-bezier/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/easing-function/steps/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/easing-function/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/easing-function/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/easing-function/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/easing-function/steps/index.md Outdated Show resolved Hide resolved
@bsmth bsmth self-assigned this Nov 20, 2024
@bsmth bsmth requested a review from pepelsbey November 22, 2024 14:17
Copy link
Member

@bsmth bsmth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super, I'm leaving a +1 -> @pepelsbey I have two suggestions if you want to take a look 👀

@bsmth bsmth removed their assignment Nov 22, 2024
Copy link
Member

@pepelsbey pepelsbey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

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 Content:Firefox Content in the Mozilla/Firefox subtree Content:Glossary Glossary entries size/l [PR only] 501-1000 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create function pages for easing functions
3 participants