Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 138 additions & 0 deletions assets/scss/_oss_info.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
// Component cards for /operations/configuration/licenses/
// Inspired by Deckhouse OSS-info layout.

.oss-cards-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 1rem;
margin: 1.5rem 0 2rem;

// Hugo wraps shortcode output in <p> when the parent is markdown.
// Flatten that so cards sit directly in the grid.
> p {
display: contents;
}
}

.oss-card {
display: flex;
flex-direction: column;
gap: .5rem;
padding: 1rem 1.1rem;
border: 1px solid var(--bs-gray-300, #dee2e6);
border-radius: .5rem;
background: var(--bs-body-bg, #fff);
transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;

&:hover {
border-color: var(--bs-primary, #0d6efd);
box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
transform: translateY(-1px);
}
}

.oss-card-head {
display: flex;
align-items: center;
gap: .65rem;
}

.oss-card-logo {
width: 36px;
height: 36px;
flex-shrink: 0;
object-fit: contain;
border-radius: 6px;
}

.oss-card-logo-fallback {
display: inline-flex;
align-items: center;
justify-content: center;
font-family: var(--bs-font-monospace, ui-monospace, monospace);
font-size: .8rem;
font-weight: 600;
letter-spacing: .02em;
color: #fff;
background: hsl(var(--oss-hue, 210), 55%, 45%);
user-select: none;
}

.oss-card-titleblock {
display: flex;
flex-direction: column;
min-width: 0;
}

.oss-card-title {
font-weight: 600;
font-size: 1rem;
line-height: 1.25;
color: inherit;
text-decoration: none;
word-break: break-word;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Replace deprecated word-break: break-word property.

The value break-word for word-break is deprecated. Use overflow-wrap: break-word instead, which provides the same behavior (breaks long words at arbitrary points to prevent overflow).

🔧 Proposed fix
   color: inherit;
   text-decoration: none;
-  word-break: break-word;
+  overflow-wrap: break-word;
📝 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.

Suggested change
word-break: break-word;
overflow-wrap: break-word;
🧰 Tools
🪛 Stylelint (17.10.0)

[error] 73-73: Deprecated keyword "break-word" for property "word-break" (declaration-property-value-keyword-no-deprecated)

(declaration-property-value-keyword-no-deprecated)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@assets/scss/_oss_info.scss` at line 73, Replace the deprecated CSS
declaration `word-break: break-word` in assets/scss/_oss_info.scss with the
modern equivalent by using `overflow-wrap: break-word` (remove or replace the
`word-break: break-word` line); locate the occurrence of `word-break:
break-word` and update it to use `overflow-wrap: break-word` to preserve the
intended word-wrapping behavior.


&:hover {
color: var(--bs-primary, #0d6efd);
text-decoration: underline;
}
}

.oss-card-version {
font-family: var(--bs-font-monospace, ui-monospace, monospace);
font-size: .8rem;
color: var(--bs-secondary, #6c757d);
margin-top: 1px;
}

.oss-card-desc {
margin: 0;
font-size: .9rem;
color: var(--bs-body-color, #212529);
line-height: 1.4;
}

.oss-card-meta {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: .35rem;
font-size: .82rem;
color: var(--bs-secondary, #6c757d);
margin-top: auto;
padding-top: .25rem;
}

.oss-card-license {
font-family: var(--bs-font-monospace, ui-monospace, monospace);
background: var(--bs-gray-100, #f8f9fa);
border: 1px solid var(--bs-gray-200, #e9ecef);
border-radius: 3px;
padding: .05rem .4rem;
color: var(--bs-body-color, #212529);
font-size: .78rem;
}

.oss-card-usedin {
color: inherit;
text-decoration: none;
border-bottom: 1px dashed currentColor;

&:hover {
color: var(--bs-primary, #0d6efd);
border-bottom-style: solid;
}
}

// Dark mode (Docsy supports it via data-bs-theme="dark")
[data-bs-theme="dark"] {
.oss-card {
border-color: var(--bs-gray-700, #495057);
background: var(--bs-gray-900, #212529);
}

.oss-card-license {
background: var(--bs-gray-800, #343a40);
border-color: var(--bs-gray-700, #495057);
}
}
1 change: 1 addition & 0 deletions assets/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ a {
@import "support";
@import "ecosystem";
@import "oss_health";
@import "oss_info";
@import "adopters_wall";
@import "announcement-banner";
@import "tabs_alerts";
Expand Down
Loading