-
-
Notifications
You must be signed in to change notification settings - Fork 47
changes to the demo cards and feature card #145
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,11 +71,12 @@ | |
| } | ||
|
|
||
| .badge { | ||
| background: rgba(255, 255, 255, 0.2); | ||
| background: #A9A9A980; | ||
| padding: 6px 12px; | ||
| border-radius: 20px; | ||
| font-size: 14px; | ||
| font-weight: 500; | ||
| border: 1px solid #F8FAFC80; | ||
|
gamersprogrammer marked this conversation as resolved.
gamersprogrammer marked this conversation as resolved.
|
||
| } | ||
|
|
||
| .demo-section { | ||
|
|
@@ -109,22 +110,24 @@ | |
| } | ||
|
|
||
| .demo-item { | ||
| background: rgba(0, 0, 0, 0.2); | ||
| background: rgba(169, 169, 169, 0.5); | ||
| padding: 20px; | ||
| border-radius: 12px; | ||
| box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); | ||
| text-align: center; | ||
| border: 1px solid rgba(248, 250, 252, 0.5); | ||
| } | ||
|
|
||
| .demo-item h3 { | ||
| color: #fff; | ||
| color: #ffffff; | ||
| margin-bottom: 15px; | ||
| font-size: 16px; | ||
| } | ||
|
|
||
| .demo-item p { | ||
| font-size: 13px; | ||
| margin-bottom: 15px; | ||
| color: rgba(255, 255, 255, 0.8); | ||
| color: #fafafa; | ||
| } | ||
|
Comment on lines
121
to
131
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check color contrast for .demo-item text elements
python << 'EOF'
def hex_to_rgb(hex_color):
"""Convert hex to RGB."""
hex_color = hex_color.lstrip('#')
return tuple(int(hex_color[i:i+2], 16) for i in (0, 2, 4))
def relative_luminance(rgb):
"""Calculate relative luminance."""
def adjust(channel):
c = channel / 255.0
return c / 12.92 if c <= 0.03928 else ((c + 0.055) / 1.055) ** 2.4
return 0.2126 * adjust(rgb[0]) + 0.7152 * adjust(rgb[1]) + 0.0722 * adjust(rgb[2])
def contrast_ratio(lum1, lum2):
"""Calculate contrast ratio."""
lighter = max(lum1, lum2)
darker = min(lum1, lum2)
return (lighter + 0.05) / (darker + 0.05)
# Background gradient colors
bg_start_rgb = hex_to_rgb('#667eea')
bg_end_rgb = hex_to_rgb('#764ba2')
bg_mid = tuple((bg_start_rgb[i] + bg_end_rgb[i]) // 2 for i in range(3))
# .demo-item background (semi-transparent gray at 50% opacity)
item_bg_rgb = (169, 169, 169)
item_alpha = 0.5
# Blend semi-transparent background with gradient
blended_bg = tuple(int(item_bg_rgb[i] * item_alpha + bg_mid[i] * (1 - item_alpha)) for i in range(3))
# Text colors
h3_text_rgb = hex_to_rgb('#ffffff')
p_text_rgb = hex_to_rgb('#fafafa')
lum_bg = relative_luminance(blended_bg)
lum_h3 = relative_luminance(h3_text_rgb)
lum_p = relative_luminance(p_text_rgb)
ratio_h3 = contrast_ratio(lum_bg, lum_h3)
ratio_p = contrast_ratio(lum_bg, lum_p)
print(f".demo-item effective background: #{blended_bg[0]:02x}{blended_bg[1]:02x}{blended_bg[2]:02x}")
print(f"\n.demo-item h3 (16px, `#ffffff`):")
print(f" Contrast ratio: {ratio_h3:.2f}:1")
print(f" WCAG AA normal text (≥4.5:1): {'PASS' if ratio_h3 >= 4.5 else 'FAIL'}")
print(f" WCAG AA large text (≥3:1): {'PASS' if ratio_h3 >= 3.0 else 'FAIL'}")
print(f"\n.demo-item p (13px, `#fafafa`):")
print(f" Contrast ratio: {ratio_p:.2f}:1")
print(f" WCAG AA normal text (≥4.5:1): {'PASS' if ratio_p >= 4.5 else 'FAIL'}")
print(f" WCAG AA large text (≥3:1): {'PASS' if ratio_p >= 3.0 else 'FAIL'}")
EOFRepository: AOSSIE-Org/SocialShareButton Length of output: 367 Address insufficient color contrast for The text colors used in 🤖 Prompt for AI Agents |
||
|
|
||
| .feature-grid { | ||
|
|
@@ -135,10 +138,12 @@ | |
| } | ||
|
|
||
| .feature-card { | ||
| background: rgba(0, 0, 0, 0.2); | ||
| background: #A9A9A980; | ||
| padding: 20px; | ||
| border-radius: 12px; | ||
| box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); | ||
| text-align: center; | ||
| border: 1px solid #F8FAFC80; | ||
|
Comment on lines
+141
to
+146
|
||
| } | ||
|
|
||
| .feature-icon { | ||
|
|
@@ -147,14 +152,14 @@ | |
| } | ||
|
|
||
| .feature-card h3 { | ||
| color: #fff; | ||
| color: #ffffff; | ||
| font-size: 16px; | ||
| margin-bottom: 10px; | ||
| } | ||
|
|
||
| .feature-card p { | ||
| font-size: 13px; | ||
| color: rgba(255, 255, 255, 0.8); | ||
| color: #fafafa; | ||
| margin: 0; | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.