Skip to content

Conversation

@therunnas
Copy link

@therunnas therunnas commented Aug 13, 2025

Related Issue

N/A

Describe the changes you've made

This PR introduces two improvements:

  1. Documentation/Demo — adds a tiny demo.html so contributors can quickly visualize how the reset affects lists, forms, buttons and typography. The demo uses the official Gardevoir CDN for zero-setup.

  2. Accessibility (optional snippet) — includes a small @media (prefers-reduced-motion) snippet so projects that want reduced motion can reduce animations/transitions and use default scroll behavior.

Changes after review:

  • Switched SCSS comment to English.
  • Added type="button" to the demo button.
  • Fixed stylesheet reference to use the official Gardevoir CDN instead of a local file.
  • Removed VS Code launch.json to avoid a hardcoded dev-server port.

How has this been tested?

  • Opened docs/demo.html directly in the browser and confirmed reset styles apply correctly.
  • Verified that the demo button behaves as expected with type="button".
  • Checked that the CDN stylesheet loads properly without errors.
  • Tested the prefers-reduced-motion snippet by toggling the OS-level accessibility setting.

Checklist

  • I have performed a self-review of my own code.
  • I have commented on my code where necessary.
  • I have made corresponding changes to the documentation.
  • I have followed the code style of the project.
  • I have tested my code, and it works without errors.

Additional Information

If preferred, I can split this into two separate PRs (demo vs. accessibility snippet), or move the reduced-motion snippet into a docs/addons file. Happy to adjust based on project guidelines.

Code of Conduct

I agree to follow this project's Code of Conduct

Summary by CodeRabbit

  • New Features
    • Added reduced-motion support to honor user preferences and minimize animations/transitions.
  • Bug Fixes
    • Prevented unintended form submissions by making demo buttons non-submit.
  • Documentation
    • Added a static demo page showcasing lists, forms, buttons, and typography.
    • Updated the demo to load the stylesheet from a CDN.
  • Style
    • Standardized an accessibility comment to English.
  • Chores
    • Removed editor-specific launch configuration.

@coderabbitai
Copy link

coderabbitai bot commented Aug 13, 2025

Walkthrough

Adds a reduced-motion accessibility rule to global styles, updates an accessibility comment to English, replaces local stylesheet with the Gardevoir CDN and sets explicit button types in the demo, and adds a new docs/demo.html showcasing Reseter.css examples.

Changes

Cohort / File(s) Summary of Changes
Global styles: reduced motion
src/components/global.scss
Inserted a @media (prefers-reduced-motion: reduce) block disabling animations/transitions and setting scroll-behavior: auto; updated an accessibility comment to English.
Demo HTML and CDN updates
demo.html
Replaced local reseter.css import with Gardevoir CDN (https://cdn.jsdelivr.net/npm/gardevoir) and set two form buttons to type="button" to prevent submission.
New demo page
docs/demo.html
Added a self-contained demo page that loads Reseter.css from the CDN and contains example lists, a form with non-submitting button, and typography/button samples.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Browser
  participant CDN as Gardevoir CDN
  participant Site as Demo HTML

  User->>Browser: Navigate to demo page
  Browser->>CDN: GET /gardevoir (Reseter.css)
  CDN-->>Browser: 200 OK (stylesheet)
  Browser->>Site: Parse HTML, apply CSS
  Note right of Browser: If prefers-reduced-motion: reduce\nreduced-motion rules override animations/transitions
  Browser-->>User: Render styled page (buttons non-submitting)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I twitch my ears to gentler motion’s tune,
Halted twirls and fades beneath the moon.
A CDN gust brings tidy styles along,
Buttons stay put—no accidental song.
Demo burrows out, clean examples bloom. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title accurately and concisely summarizes the primary changes: it states the PR adds a docs/demo HTML that uses the Gardevoir CDN and an optional reduced‑motion CSS snippet. It directly reflects the changes described in the raw_summary and pr_objectives and is specific rather than generic or noisy. The phrasing is a single clear sentence suitable for scanable history.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 36e9581 and 9fbf0f4.

📒 Files selected for processing (1)
  • src/components/global.scss (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/global.scss

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (2)
src/components/global.scss (1)

27-27: Unify comment language with project conventions.

The rest of the file is in English; keep comments consistent.

Apply this one-line change if you keep the current approach:

-// Acessibilidade: reduz animações para usuários que preferem menos movimento
+// Accessibility: reduce motion for users who prefer less movement
demo.html (1)

33-35: Set an explicit type on standalone button to avoid accidental form submission.

Even though it’s outside the form now, being explicit prevents issues if the markup changes later.

-    <button>Clique Aqui</button>
+    <button type="button">Clique Aqui</button>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e89f83b and 82334e6.

📒 Files selected for processing (3)
  • .vscode/launch.json (1 hunks)
  • demo.html (1 hunks)
  • src/components/global.scss (1 hunks)
🔇 Additional comments (2)
.vscode/launch.json (1)

11-11: Confirm the dev server port before hardcoding 8080

Short: I searched the repo for "8080" and common dev-server configs. I only found parcel-related entries inside yarn.lock and no explicit dev server config or any "8080" matches — so the port can't be confirmed from the codebase.

Files/locations to check:

  • .vscode/launch.json — line ~11:
            "url": "http://localhost:8080",
  • Note: repo contains parcel deps in yarn.lock but no visible dev-server config (vite/webpack/serve/etc.).

Action: If you run a dev server, confirm the correct port (or make it configurable). If there is no dev server, prefer the "file" launch (Option A mentioned earlier).

demo.html (1)

7-7: Verify reseter.css path — search found no matching file; confirm built location

I ran the suggested search and found no file named reseter.css in the repository. Please confirm the correct path (or the built artifact location) and update the link.

  • demo.html — line 7: <link rel="stylesheet" href="reseter.css" />

Suggested change (example — adjust to the actual built path):

-  <link rel="stylesheet" href="reseter.css" />
+  <link rel="stylesheet" href="dist/reseter.css" />

@kkrishguptaa
Copy link
Owner

Hi I cannot understand what this PR is meant to do, can you explain

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
demo.html (1)

2-2: Document language mismatch: Portuguese content with lang="en".

Align the lang attribute with the content for accessibility and assistive tech.

-<html lang="en">
+<html lang="pt-BR">
🧹 Nitpick comments (1)
demo.html (1)

26-29: Improve form accessibility: explicit label associations and useful attributes.

Even in demos, explicit for/id improves a11y and testing. Add name and autocomplete hints. Keep type="button" if you don’t intend to submit.

-      <label>Nome: <input type="text" /></label><br><br>
-      <label>Email: <input type="email" /></label><br><br>
-      <button type="button">Enviar</button>
+      <label for="nome">Nome:</label>
+      <input id="nome" name="nome" type="text" autocomplete="name" /><br><br>
+      <label for="email">Email:</label>
+      <input id="email" name="email" type="email" autocomplete="email" inputmode="email" /><br><br>
+      <button type="button">Enviar</button>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 82334e6 and 6e91d58.

📒 Files selected for processing (3)
  • (demo) use Gardevoir CDN; fix button type  style comment in English  chore remove VSCode launch (1 hunks)
  • demo.html (1 hunks)
  • src/components/global.scss (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/global.scss
🔇 Additional comments (4)
(demo) use Gardevoir CDN; fix button type  style comment in English  chore remove VSCode launch (3)

20-22: Explicit type="button" to prevent unintended form submission — OK.

Good call for a demo page with no form action.


27-28: Non-form demo button explicitly set to type="button" — OK.

Matches the intent to avoid accidental form submits.


41-41: Comment localized to English — OK.

Keeps code comments consistent and accessible to a broader audience.

demo.html (1)

33-34: LGTM: demo button uses type="button".

Appropriate for a non-form interactive element in a demo.

@therunnas therunnas changed the title Add seu nome Docs: add demo HTML using Gardevoir CDN + optional reduced-motion snippet Aug 17, 2025
@therunnas
Copy link
Author

@kkrishguptaa Hi, thanks for asking! Let me explain the purpose of this PR.

The main goals are:

  1. Demo page (demo.html) – added a very small example (now inside /docs) to quickly show how Reseter.css affects lists, forms, buttons, and typography. This makes it easier for contributors to visualize the reset styles without needing to set up a separate project.

  2. Accessibility snippet – introduced an optional @media (prefers-reduced-motion) snippet to reduce animations and transitions for users who prefer less motion, following accessibility best practices.

Based on the review feedback, I also:

  • Changed SCSS comments to English for consistency.
  • Added type="button" to the demo button to avoid unintended form submissions.
  • Fixed the stylesheet link to use the official Reseter.css CDN.
  • Removed the VS Code launch.json to avoid hardcoding a dev-server port.
  • Moved the demo file into /docs to keep the repository structure clean.

In short, this PR improves developer experience (with a quick demo) and user accessibility (reduced-motion support), while also cleaning up small repo details.

If preferred, I can split this into two PRs (demo vs. accessibility snippet) or move the reduced-motion snippet into a docs/addons file.

Copy link
Owner

@kkrishguptaa kkrishguptaa left a comment

Choose a reason for hiding this comment

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

Please delete the unnecessary file and please translate this the demo to English. Thank you. The PR for reduced motion should be a different one. I suggest you make a file "opinionated.scss" in the directory with index and mini, let's bundle that particular thing into a different version so that it doesn't give unexpected behaviour to users of a css reset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants