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

scroll-snap-type: clarification #36367

Merged
merged 2 commits into from
Oct 17, 2024
Merged

scroll-snap-type: clarification #36367

merged 2 commits into from
Oct 17, 2024

Conversation

estelle
Copy link
Member

@estelle estelle commented Oct 16, 2024

Added link to new guide; (We should alsow add events and their inline/block directions with an explanation, but waiting a bit to when that is a little better supported)
This property defines the element as a snap port, so added that,
add link to glossary entry, which is in #36300.
updated the HTML and CSS to reduce class names, hopefully making it easier to mentally parse.

@estelle estelle requested a review from a team as a code owner October 16, 2024 03:13
@estelle estelle requested review from chrisdavidmills and removed request for a team October 16, 2024 03:13
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs size/m [PR only] 51-500 LoC changed labels Oct 16, 2024
Copy link
Contributor

github-actions bot commented Oct 16, 2024

Preview URLs

Flaws (1)

URL: /en-US/docs/Web/CSS/scroll-snap-type
Title: scroll-snap-type
Flaw count: 1

  • broken_links:
    • Can't resolve /en-US/docs/Glossary/Scroll_snap#snapport

(comment last updated: 2024-10-17 06:10:29)

Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

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

@estelle nice work. Just a couple of bits for you to look at here.

@@ -7,10 +7,14 @@ browser-compat: css.properties.scroll-snap-type

{{CSSRef}}

The **`scroll-snap-type`** [CSS](/en-US/docs/Web/CSS) property sets how strictly snap points are enforced on the scroll container in case there is one.
The **`scroll-snap-type`** [CSS](/en-US/docs/Web/CSS) property is set on a {{glossary("scroll container")}}, opting it into scroll snapping by setting the direction and strictness of snap point enforcement within the [snap port](/en-US/docs/Glossary/Scroll_snap#snapport).
Copy link
Contributor

Choose a reason for hiding this comment

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

The link text should be scroll port, and the URL should be https://developer.mozilla.org/en-US/docs/Glossary/Scroll_container#scrollport, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

there's a new glossary coming out soon. #36300

@@ -77,90 +78,90 @@ scroll-snap-type: unset;
#### HTML

```html
<div class="holster">
<div class="container x mandatory-scroll-snapping" dir="ltr">
<main>
Copy link
Contributor

Choose a reason for hiding this comment

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

The HTML and CSS is much cleaner now. I do wonder about the value of having 4 vertical examples — LTR/RTL has basically no effect on vertical scrollers, except to make the scrollbar appear on the other side of the container. Is this worth demonstrating? I wonder whether people will be confused and think that there is something more to it.

Instead, would it be a bit more intuitive to show the 4 horizontal examples first, and then just show two vertical examples labeled "Y Mand." and "Y Prox."?

I'm not 100% sure about this; whatever you decide is good.

Copy link
Member Author

Choose a reason for hiding this comment

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

i'll shrink it in a next PR. I'll be revisiting all these pages after #36300 is merged

@estelle estelle merged commit fcbc9f9 into main Oct 17, 2024
9 checks passed
@estelle estelle deleted the scrollsnap branch October 17, 2024 06:10
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 size/m [PR only] 51-500 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants