Skip to content

closes 101: cards improvements - #102

Merged
prudhomm merged 6 commits into
mainfrom
101-cards-improvements
Jul 22, 2026
Merged

prudhomm merged 6 commits into
mainfrom
101-cards-improvements

Conversation

@prudhomm

@prudhomm prudhomm commented Jan 7, 2026

Copy link
Copy Markdown
Member

@prudhomm prudhomm linked an issue Jan 7, 2026 that may be closed by this pull request
@prudhomm prudhomm self-assigned this Jan 7, 2026
@prudhomm
prudhomm requested a review from Copilot January 7, 2026 19:49
@netlify

netlify Bot commented Jan 7, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for antora-ui-peppy-froyo-6a3edb ready!

Name Link
🔨 Latest commit 88fe16c
🔍 Latest deploy log https://app.netlify.com/projects/antora-ui-peppy-froyo-6a3edb/deploys/6970f44bdc4e65000853c9bf
😎 Deploy Preview https://deploy-preview-102--antora-ui-peppy-froyo-6a3edb.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR implements a comprehensive set of styling and functionality improvements for card-based layouts in an Antora documentation site. The changes focus on enhancing visual presentation, adding new card categories, improving debugging capabilities, and introducing utility styles for complex page layouts.

Key changes:

  • Enhanced attribute lookup logic in card helpers to support multiple naming patterns
  • Added four new CSS modules for specialized styling (tables, team pages, section backgrounds, and lead paragraphs)
  • Extended card layout system with four new card categories (infos, resources, wps, highlights)
  • Added responsive grid utilities and text styling utilities

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/helpers/get-page-cards-multi.js Enhanced attribute lookup to check both 'page-' prefixed and non-prefixed attribute names in multiple locations; improved debug logging to display group titles
src/css/site.css Added imports for four new CSS modules to integrate them into the build
src/css/team.css New file providing circular photo styling, profile cards, and hover effects for team member pages
src/css/tables.css New file with modern table styles including striped rows, clean borders, dark mode support, and publication-specific layouts
src/css/section-backgrounds.css New file enabling full-width alternating background sections with card-style quoteblocks for long single-page layouts
src/css/lead.css New file with extensive lead paragraph, hero block, and callout styles with comprehensive theming support including dark mode
src/css/grid.css Extended with asymmetric grid layouts (sidebar-main patterns), exampleblock grid support, text alignment utilities, and color utilities
src/css/cards-layout.css Added support for four new card categories (infos, resources, wps, highlights), updated grid parameters, and added group title styling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/css/cards-layout.css
Comment on lines +27 to +31
grid-template-columns: repeat(auto-fill, minmax(300px, 400px));
gap: 1.5rem;
margin-top: 1.5em;
margin-bottom: 5em;
justify-content: start;

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

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

CSS grid specification inconsistency: The min and max values in the minmax() function create a narrow range (300px to 400px) which limits flexibility. Combined with justify-content: start, this may cause cards to not fill available space on wide screens. Consider either using a wider max value (e.g., minmax(300px, 1fr)) or removing justify-content: start to allow cards to stretch and fill available space more naturally.

Copilot uses AI. Check for mistakes.
Comment thread src/css/section-backgrounds.css Outdated
Comment on lines +71 to +72
.doc .section-gray .quoteblock:hover,
.doc .section-white .quoteblock:hover {

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

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

Conflicting hover effects: This general hover effect on quoteblocks conflicts with the more specific hover effect defined in team.css (lines 51-55) which applies different transform values (translateY(-3px) vs translateY(-2px)) and box-shadow values. When both stylesheets are loaded, the specificity is the same, so the order of imports in site.css will determine which one wins. This can lead to inconsistent behavior. Consider using a more specific selector here, or align the hover values between the two files, or use a modifier class to differentiate team member cards from generic section cards.

Suggested change
.doc .section-gray .quoteblock:hover,
.doc .section-white .quoteblock:hover {
.doc .section-gray .quoteblock:not([class*="team"]):hover,
.doc .section-white .quoteblock:not([class*="team"]):hover {

Copilot uses AI. Check for mistakes.
Comment thread src/css/grid.css
Comment on lines +163 to +168
grid-template-columns: 1fr 300px;
align-items: start;
}

.doc .exampleblock.grid-sidebar-main > .content {
grid-template-columns: 300px 1fr;

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

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

Inconsistent sidebar width values: The regular grid-main-sidebar and grid-sidebar-main classes use 280px for the sidebar, while the exampleblock variants use 300px. This inconsistency could lead to unexpected layout differences between regular grids and exampleblock grids when using the same semantic class name. Consider using consistent values (either 280px or 300px) across both implementations for maintainability.

Suggested change
grid-template-columns: 1fr 300px;
align-items: start;
}
.doc .exampleblock.grid-sidebar-main > .content {
grid-template-columns: 300px 1fr;
grid-template-columns: 1fr 280px;
align-items: start;
}
.doc .exampleblock.grid-sidebar-main > .content {
grid-template-columns: 280px 1fr;

Copilot uses AI. Check for mistakes.
Comment thread src/css/team.css
Comment on lines +34 to +48
/* Role/title styling (italic text) */
.doc .section-gray .quoteblock .text-center em,
.doc .section-white .quoteblock .text-center em {
display: block;
color: #666;
font-size: 0.9rem;
margin-bottom: 0.25rem;
}

/* Institution styling */
.doc .section-gray .quoteblock .text-center p:last-child,
.doc .section-white .quoteblock .text-center p:last-child {
color: #888;
font-size: 0.85rem;
}

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

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

Hardcoded color values in team.css lack dark mode support: Several color values like #666, #888, and #eee are hardcoded without corresponding dark mode overrides. This means in dark mode, these colors may not provide sufficient contrast or may look inconsistent with the rest of the UI. Consider adding dark mode support using html.is-dark selectors, similar to the pattern used in tables.css and lead.css.

Copilot uses AI. Check for mistakes.
Comment thread src/css/team.css
Comment on lines +50 to +52
/* Hover effect for team cards with photos */
.doc .section-gray .quoteblock:has(img):hover,
.doc .section-white .quoteblock:has(img):hover {

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

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

Browser compatibility concern with :has() selector: The :has() pseudo-class selector is used here but has limited browser support - it's not supported in Firefox versions before 121 (December 2023). Consider either documenting this requirement, providing a fallback style, or using a different approach that doesn't rely on :has() for better browser compatibility.

Suggested change
/* Hover effect for team cards with photos */
.doc .section-gray .quoteblock:has(img):hover,
.doc .section-white .quoteblock:has(img):hover {
/* Hover effect for team cards */
.doc .section-gray .quoteblock:hover,
.doc .section-white .quoteblock:hover {

Copilot uses AI. Check for mistakes.
Comment on lines +169 to +170
// Note: Antora strips the 'page-' prefix when storing page attributes
// So :page-cards-catalog-title: becomes page.attributes['cards-catalog-title']

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

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

Incomplete comment about Antora attribute behavior: The comment states that "Antora strips the 'page-' prefix when storing page attributes", but the code actually checks both with and without the prefix in BOTH asciidoc.attributes and attributes properties. Looking at the patterns elsewhere in this same file (lines 34-37, 48-51) and other helpers, it appears that asciidoc.attributes preserves the full attribute name including 'page-' prefix, while attributes may have it stripped. The comment should be clarified to accurately reflect that both locations (asciidoc.attributes and attributes) are checked with both naming patterns (with and without 'page-' prefix) to handle all possible cases.

Suggested change
// Note: Antora strips the 'page-' prefix when storing page attributes
// So :page-cards-catalog-title: becomes page.attributes['cards-catalog-title']
// Antora may store page attributes with or without the 'page-' prefix depending on context.
// In practice, asciidoc.attributes often preserves the full name (e.g. 'page-cards-X-title'),
// while attributes may have the prefix stripped (e.g. 'cards-X-title'), so we check both forms
// in both locations to handle all cases.

Copilot uses AI. Check for mistakes.
@prudhomm
prudhomm merged commit 88fe16c into main Jul 22, 2026
10 checks passed
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.

cards improvements

2 participants