Skip to content

feat(styles): add extra styles for homepage#65

Open
marissahuysentruyt wants to merge 10 commits into
mainfrom
homepage-tweaks
Open

feat(styles): add extra styles for homepage#65
marissahuysentruyt wants to merge 10 commits into
mainfrom
homepage-tweaks

Conversation

@marissahuysentruyt

@marissahuysentruyt marissahuysentruyt commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds reusable Spectrum-style button classes to the global stylesheet and restructures the home template's intro area into a centered hero with a pill-shaped banner.

  • Introduces a .btn base class using Spectrum 2 component tokens (sizing, radius, typography, transition timing) with configurable --button-* custom properties.
  • Adds two variants: .btn-primary/.btn-accent
  • Adds :hover / :focus-visible / :active states driven by the --button-background-color-hover token.
  • Adds the light and dark BG images

Home template (templates/home/home.css, templates/home/home.js)

  • Renames the intro container from home-column to home-hero and lays it out as a centered flex column.
  • Wraps the first two intro elements in a new .home-banner pill (inline-flex, rounded, translucent blue border/background using rgb(from …) relative color syntax).
  • Constrains hero paragraphs to 80ch and aligns any banner icon (svg) inline with its text.

Screenshots (if applicable)

main homepage, missing styles
Screenshot 2026-07-13 at 11 03 44 AM

draft homepage, new styles
Screenshot 2026-07-13 at 11 04 28 AM

Type of change

  • New feature / block
  • Bug fix
  • Refactor
  • Docs / content
  • Chore (deps, config, tooling)

Related issue(s)

  • fixes [TICKET]

Validation steps

  • This PR has visual elements, so it was reviewed by a designer.
  • This PR has code changes, and our linters still pass.
  • This PR affects production code, so it was browser tested (see below).
  • This PR affects existing pages, so automated E2E tests were run (see below).
  • This PR has copy changes, so copy was proofread and approved.

To Validate

URL for testing:
https://homepage-tweaks--spectrum-hub--adobe.aem.page/drafts/mhuysentruyt/homepage-test

  • Make sure all PR Checks have passed
  • Pull down the branch locally or visit the branch preview
  • Run npm test and confirm all tests pass
  • Run npm run lint and confirm no linting errors
  • Verified in browser with aem up
  • On the home page, confirm the intro area renders as a centered hero with a rounded pill banner wrapping the first two elements.
  • Confirm the banner border/background render as translucent blue in both light (40% and 14% opacity) and dark mode (59% and 26%) according to prototype.
  • Confirm hero paragraphs wrap at ~80 characters.
  • Render a .btn.btn-primary and .btn.btn-accent; confirm sizing, radius, and text color match Spectrum specs.
  • Hover/focus/activate each button variant and confirm the background shifts to the hover token.

Accessibility testing checklist

  • Keyboard

    1. Go to the home page branch preview.
    2. Tab through the page.
    3. Expect: any .btn rendered as a link/button receives focus in logical order, shows a visible :focus-visible indicator, and activates with Enter (and Space for buttons). The .home-banner is non-interactive text/icon content — confirm it is not a focus stop and does not introduce a trap.
  • Screen reader

    1. Go to the home page branch preview with VoiceOver/NVDA.
    2. Navigate the hero region.
    3. Expect: heading is announced with its correct level; banner text is announced as text; any decorative svg in the banner is not announced (or is properly labeled if meaningful); button variants announce role + accessible name.

Device review

  • Did it pass in Desktop?
  • Did it pass in (emulated) Mobile?
  • Did it pass in (emulated) iPad?

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@aem-code-sync

aem-code-sync Bot commented Jul 10, 2026

Copy link
Copy Markdown

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run all PSI checks
  • Re-run failed PSI checks
  • Re-sync branch
Commits

@aem-code-sync

aem-code-sync Bot commented Jul 10, 2026

Copy link
Copy Markdown
Page Scores Audits Google
📱 /drafts/mhuysentruyt/homepage-test PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ /drafts/mhuysentruyt/homepage-test PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@marissahuysentruyt marissahuysentruyt added the ✨ Feature New feature, enhancement, or request label Jul 10, 2026
@marissahuysentruyt marissahuysentruyt self-assigned this Jul 10, 2026
@aem-code-sync
aem-code-sync Bot temporarily deployed to homepage-tweaks July 10, 2026 17:14 Inactive
@aem-code-sync
aem-code-sync Bot temporarily deployed to homepage-tweaks July 10, 2026 17:23 Inactive
@aem-code-sync
aem-code-sync Bot temporarily deployed to homepage-tweaks July 10, 2026 22:09 Inactive
@aem-code-sync
aem-code-sync Bot temporarily deployed to homepage-tweaks July 10, 2026 22:49 Inactive
@marissahuysentruyt
marissahuysentruyt marked this pull request as ready for review July 13, 2026 13:22
Comment thread blocks/header/header.css
Comment on lines -14 to -17
box-shadow:
inset 0 0 3px 0 rgb(from var(--header-inner-shadow) r g b / 65%),
0 0 1px 0 rgb(from var(--header-outer-shadow) r g b / 10%),
0 9px 95px 0 rgb(from var(--header-outer-shadow) r g b / 5%);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

the shadows were removed from the prototype while design continues to refine the aether aesthetic.

Comment thread styles/styles.css
Comment on lines +545 to +547
padding-block-start: calc(var(--button-padding-block-start) - var(--button-border-width));
/* stylelint-disable-next-line declaration-block-no-redundant-longhand-properties */
padding-block-end: calc(var(--button-padding-block-end) - var(--button-border-width));

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think these calcs are easier to read when they're separated, but have no issue combining them to avoid a disabled stylelint rule. 👍

Comment thread styles/styles.css
Comment on lines +576 to +577
background-color: var(--button-background-color-hover);
border-color: var(--button-background-color-hover);

@marissahuysentruyt marissahuysentruyt Jul 13, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Am I overusing the hover custom prop? I'd rather have an individual prop for each interactive state (use the hover prop for :hover, use the key-focus prop for :focus-visible, etc), but the values are all identical and I like less code. The naming and semantic usage is bothering me a bit, that's all.

@aem-code-sync
aem-code-sync Bot temporarily deployed to homepage-tweaks July 13, 2026 14:15 Inactive
Comment thread blocks/header/header.css
backdrop-filter: blur(128px);

@media (width >= 900px) {
backdrop-filter: unset;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I kept the blur on the small screen header since the content takes up most of the screen as would otherwise scroll under the icons.

Comment thread styles/styles.css
background:
var(--s2-home-gradient),
var(--se-body-background-color);
background-image: url('/img/assets/background-image-light.png');

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

happy to rework anything if these images aren't performant enough. I'm a little concerned about the size being really slow to fetch.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

TODO: media/beta/light.png

@marissahuysentruyt marissahuysentruyt added the 👀 Ready for review PR is ready for review label Jul 13, 2026
Comment thread styles/styles.css

.dark-scheme {
color-scheme: dark;
background-image: url('/img/assets/background-image-dark.png');

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

TODO: media/beta/dark.png and

@marissahuysentruyt marissahuysentruyt added ❌ Do not merge This is not for merging. 🧱 Blocked Leave a PR comment on why this work is blocked. labels Jul 15, 2026
@marissahuysentruyt

Copy link
Copy Markdown
Collaborator Author

🧱 BLOCKED: waiting on chris's homepage & nav updates as it effects the way we're going to render the BG images.

@marissahuysentruyt marissahuysentruyt added 🚧 WIP Work in progress, don't judge and removed 👀 Ready for review PR is ready for review labels Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧱 Blocked Leave a PR comment on why this work is blocked. ❌ Do not merge This is not for merging. ✨ Feature New feature, enhancement, or request 🚧 WIP Work in progress, don't judge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant