-
-
Notifications
You must be signed in to change notification settings - Fork 861
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
Updated CSS Heading Color Palette #3371
Updated CSS Heading Color Palette #3371
Conversation
WalkthroughThis pull request introduces comprehensive configuration and styling updates for a documentation site. The changes focus on refactoring the Docusaurus configuration, updating CSS paths, and establishing a more robust design system. The modifications include resolving sidebar and CSS file paths, updating edit URLs, and introducing new CSS custom properties for consistent styling across the documentation site. Changes
Possibly related PRs
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Our Pull Request Approval ProcessThanks for contributing! Testing Your CodeRemember, your PRs won't be reviewed until these criteria are met:
Our policies make our code better. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (1)
docs/src/css/index.css (1)
93-94
: Remove unnecessary positioning properties.The
left
property andopacity > 1
values don't have any effect in this context.Apply this diff:
- left: -250px; - opacity: 1.3; + opacity: 1;Also applies to: 101-104, 110-111
🧰 Tools
🪛 GitHub Actions: PR Workflow
[warning] Code style issues found. Run Prettier with --write to fix formatting issues.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
docs/docusaurus.config.ts
(2 hunks)docs/src/css/custom.css
(2 hunks)docs/src/css/index.css
(1 hunks)
🧰 Additional context used
🪛 GitHub Actions: PR Workflow
docs/src/css/index.css
[warning] Code style issues found. Run Prettier with --write to fix formatting issues.
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Analyse Code With CodeQL (javascript)
🔇 Additional comments (6)
docs/docusaurus.config.ts (3)
36-39
: LGTM! Well-structured edit URL configuration.The edit URL configuration is properly structured to point to the correct repository path.
47-50
: LGTM! Good separation of CSS concerns.The separation of styles into custom.css and index.css follows good practices for maintainability.
87-87
: LGTM! Improved navigation link structure.Using a relative path for the Admin Guide href improves maintainability.
docs/src/css/custom.css (1)
129-131
: LGTM! Consistent heading hierarchy styling.The border-bottom and padding-bottom styles create a clear visual hierarchy.
Also applies to: 138-140, 144-146
docs/src/css/index.css (2)
8-37
: LGTM! Well-structured CSS custom properties.The root variables are well-organized into logical groups (brand colors, dark theme, text, UI components).
🧰 Tools
🪛 GitHub Actions: PR Workflow
[warning] Code style issues found. Run Prettier with --write to fix formatting issues.
1-593
: Address Prettier formatting issues.The pipeline reports code style issues that need to be fixed with Prettier.
Run Prettier to fix the formatting:
🧰 Tools
🪛 GitHub Actions: PR Workflow
[warning] Code style issues found. Run Prettier with --write to fix formatting issues.
--h1-markdown: #021526; | ||
--h2-markdown: #3a6d8c; | ||
--h3-markdown: #474e93; | ||
--h4-markdown: #508c9b; | ||
--h5-markdown: #6a9ab0; | ||
--h6-markdown: #888888; | ||
--hx-markdown-underline: #eeeeee; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Confirmed accessibility issues with heading colors
The current heading colors are problematic:
- Heading colors are defined globally without theme-specific variations
- Current colors have insufficient contrast against dark theme background (#111927)
- Colors appear to be designed for light theme but are being applied to dark theme as well
Recommendations:
- Define separate color variables for light and dark themes
- Use CSS selectors like
html[data-theme='dark']
to override colors for dark theme - Ensure contrast ratios meet WCAG standards (4.5:1 for normal text, 3:1 for large text)
🔗 Analysis chain
Consider color contrast ratios for accessibility.
While the color palette is aesthetically pleasing, ensure that all heading colors meet WCAG 2.1 contrast requirements (4.5:1 for normal text, 3:1 for large text) against the background color.
Run the following to check color contrast ratios:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Extract and analyze color values for WCAG contrast compliance
# Note: This is a basic check. Use a dedicated tool for thorough testing.
echo "Background color:"
rg -l "background-color.*#" | xargs rg "background-color.*#"
echo "\nHeading colors:"
rg "h[1-6]-markdown.*#" custom.css
Length of output: 5969
Script:
#!/bin/bash
# Search for theme-specific styles and content area backgrounds
echo "Theme and content area styles:"
rg -A 2 "html\[data-theme" docs/src/css/custom.css
echo "\nMarkdown content styles:"
rg "markdown|content.*background|main.*background" docs/src/css/custom.css
Length of output: 1205
Script:
#!/bin/bash
# Search for light theme background and any theme-specific heading color overrides
echo "Light theme and default styles:"
rg "(\[data-theme='light'\]|:root.*{)" -A 5 docs/src/css/custom.css
echo "\nAny theme-specific heading overrides:"
rg "\[data-theme.*\].*h[1-6]" docs/src/css/custom.css
Length of output: 441
Script:
#!/bin/bash
# Search for root styles and theme configurations
echo "Root styles:"
rg ":root" -A 10 docs/src/css/custom.css
echo "\nLight theme styles:"
rg "data-theme='light'" -A 5 docs/src/css/custom.css
echo "\nDefault background color:"
rg "^[[:space:]]*--ifm-background-color:" docs/src/css/custom.css
Length of output: 654
width: 500%; | ||
height: auto; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix extreme width values.
Width values of 500% and 1000% seem excessive and might cause layout issues.
Consider using more reasonable values (100% or less) or using a different approach for achieving the desired layout.
Also applies to: 439-440
🧰 Tools
🪛 GitHub Actions: PR Workflow
[warning] Code style issues found. Run Prettier with --write to fix formatting issues.
/** | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the copyright notice.
The current copyright notice refers to Meta Platforms. This should be updated to reflect your organization's copyright.
Apply this diff:
-* Copyright (c) Meta Platforms, Inc. and affiliates.
+* Copyright (c) PalisadoesFoundation and contributors.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
/** | |
* Copyright (c) Meta Platforms, Inc. and affiliates. | |
* | |
* This source code is licensed under the MIT license found in the | |
* LICENSE file in the root directory of this source tree. | |
*/ | |
/** | |
* Copyright (c) PalisadoesFoundation and contributors. | |
* | |
* This source code is licensed under the MIT license found in the | |
* LICENSE file in the root directory of this source tree. | |
*/ |
🧰 Tools
🪛 GitHub Actions: PR Workflow
[warning] Code style issues found. Run Prettier with --write to fix formatting issues.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop-postgres #3371 +/- ##
=====================================================
+ Coverage 7.95% 89.74% +81.79%
=====================================================
Files 312 335 +23
Lines 8105 8613 +508
Branches 1801 1898 +97
=====================================================
+ Hits 645 7730 +7085
+ Misses 7393 628 -6765
- Partials 67 255 +188
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (1)
docs/src/css/index.css (1)
397-398
:⚠️ Potential issueFix extreme width values and invalid opacity.
- Width values of 500% and 1000% are excessive and will cause layout issues.
- Opacity value of 2 is invalid (lines 210, 221, 275, 288, 400, 442).
Consider using more reasonable width values and valid opacity:
- width: 500%; + width: 100%; - width: 1000%; + width: 100%; - opacity: 2; + opacity: 1;Also applies to: 439-440
🧹 Nitpick comments (3)
docs/src/css/index.css (3)
8-37
: Consider adding documentation for CSS custom properties.The CSS variables are well-organized but would benefit from inline documentation explaining their intended usage and acceptable values.
Add comments for each group of variables, for example:
/* Brand colors */ --brand: #febc59; +/* Used for primary branding elements like logos and accents */ /* Dark theme */ --dark: #282c34; --deepdark: #20232a; +/* Used for dark mode backgrounds and contrasting elements */
452-453
: Avoid using!important
in CSS rules.Using
!important
makes styles harder to maintain and override. Consider increasing selector specificity instead.Apply this diff:
- text-decoration: none !important; - border-bottom: none; + text-decoration: none; + border-bottom: 0;
1-593
: Consider architectural improvements for better maintainability.
- Consolidate media queries: Similar breakpoints (480px, 960px) are repeated throughout the file. Consider using a single media query per breakpoint.
- Use CSS variables consistently: Some color values are hardcoded (e.g.,
#1cbb99
,#c7c7c7
) instead of using the defined CSS variables.Example of consolidated media queries:
@media only screen and (max-width: 480px) { /* Mobile styles */ .HeaderHero { ... } .SixthPanel { ... } .seventh-panel { ... } }
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/src/css/index.css
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Test Application
🔇 Additional comments (1)
docs/src/css/index.css (1)
1-6
: Update the copyright notice.The copyright notice still refers to Meta Platforms and should be updated to reflect your organization.
left: -250px; | ||
opacity: 1.3; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix positioning and opacity values.
- Using negative left positioning (
left: -250px
) can cause content to overflow or be hidden. Consider using CSS Grid or Flexbox for layout. - Opacity values greater than 1 (
opacity: 1.1
,opacity: 1.3
) have no effect as opacity is clamped between 0 and 1.
Apply this diff:
- left: -250px;
- opacity: 1.3;
+ opacity: 1;
- left: -250px;
- opacity: 1.1;
+ opacity: 1;
- left: -250px;
- opacity: 1.1;
+ opacity: 1;
Also applies to: 102-104, 110-112
f7d28d5
into
PalisadoesFoundation:develop-postgres
Updated CSS Heading Color Palette
Summary by CodeRabbit
Documentation
Style
Chores