-
Notifications
You must be signed in to change notification settings - Fork 2
Add neoteroi timeline CSS and register changelog category #166
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
189 changes: 188 additions & 1 deletion
189
material-overrides/assets/stylesheets/timeline-neoteroi.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,188 @@ | ||
| /* TODO: add styling for timeline element */ | ||
| /** | ||
| * Neoteroi Timeline Styles | ||
| * Compiled from upstream SCSS and customized for the kluster Material theme. | ||
| * Supports vertical left layout only (the layout used in kluster docs). | ||
| */ | ||
|
|
||
| /* ------------------------------------------------------------------ */ | ||
| /* Error state */ | ||
| /* ------------------------------------------------------------------ */ | ||
|
|
||
| .nt-error { | ||
| border: 2px dashed darkred; | ||
| padding: 0 1rem; | ||
| background: #faf9ba; | ||
| color: darkred; | ||
| } | ||
|
|
||
| /* ------------------------------------------------------------------ */ | ||
| /* Timeline container */ | ||
| /* ------------------------------------------------------------------ */ | ||
|
|
||
| .nt-timeline { | ||
| margin-top: 30px; | ||
| } | ||
|
|
||
| /* Vertical left layout */ | ||
| .nt-timeline.vertical.left { | ||
| padding-left: 100px; | ||
| } | ||
|
|
||
| /* ------------------------------------------------------------------ */ | ||
| /* Timeline items wrapper */ | ||
| /* ------------------------------------------------------------------ */ | ||
|
|
||
| .nt-timeline-items { | ||
| display: flex; | ||
| position: relative; | ||
| } | ||
|
|
||
| /* Vertical layout — stack items top to bottom */ | ||
| .nt-timeline.vertical .nt-timeline-items { | ||
| flex-direction: column; | ||
| } | ||
|
|
||
| .nt-timeline-items > div { | ||
| min-height: 100px; | ||
| padding-top: 2px; | ||
| padding-bottom: 20px; | ||
| } | ||
|
|
||
| /* Vertical connector line — blue accent, single solid line */ | ||
| .nt-timeline.vertical.left .nt-timeline-items { | ||
| background: no-repeat 30px/2px 100%; | ||
| background-image: linear-gradient( | ||
| to bottom, | ||
| var(--info-blue-500, #4e75ff), | ||
| var(--info-blue-500, #4e75ff) | ||
| ); | ||
| } | ||
|
|
||
| /* ------------------------------------------------------------------ */ | ||
| /* Individual timeline item */ | ||
| /* ------------------------------------------------------------------ */ | ||
|
|
||
| .nt-timeline-item { | ||
| position: relative; | ||
| } | ||
|
|
||
| .nt-timeline.vertical.left .nt-timeline-item { | ||
| padding-left: 70px; | ||
| } | ||
|
|
||
| /* ------------------------------------------------------------------ */ | ||
| /* Before / after spacers */ | ||
| /* ------------------------------------------------------------------ */ | ||
|
|
||
| .nt-timeline-before { | ||
| content: ""; | ||
| height: 15px; | ||
| } | ||
|
|
||
| /* Fade-in segment at top of item */ | ||
| .nt-timeline.vertical.left .nt-timeline-before { | ||
| background: linear-gradient( | ||
| rgba(78, 117, 255, 0) 0%, | ||
| var(--info-blue-500, #4e75ff) 100% | ||
| ) | ||
| no-repeat 30px/2px 100%; | ||
| } | ||
|
|
||
| .nt-timeline-after { | ||
| content: ""; | ||
| height: 60px; | ||
| margin-bottom: 20px; | ||
| } | ||
|
|
||
| /* Fade-out segment at bottom of item */ | ||
| .nt-timeline.vertical.left .nt-timeline-after { | ||
| background: linear-gradient( | ||
| var(--info-blue-500, #4e75ff) 0%, | ||
| rgba(78, 117, 255, 0) 100% | ||
| ) | ||
| no-repeat 30px/2px 100%; | ||
| } | ||
|
|
||
| /* ------------------------------------------------------------------ */ | ||
| /* Dot */ | ||
| /* ------------------------------------------------------------------ */ | ||
|
|
||
| .nt-timeline-dot { | ||
| position: absolute; | ||
| width: 20px; | ||
| height: 20px; | ||
| border-radius: 100%; | ||
| background-color: var(--info-blue-500, #4e75ff); | ||
| top: 0; | ||
| z-index: 2; | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| box-shadow: | ||
| 0 2px 1px -1px rgb(0 0 0 / 20%), | ||
| 0 1px 1px 0 rgb(0 0 0 / 14%), | ||
| 0 1px 3px 0 rgb(0 0 0 / 12%); | ||
| /* Border adapts to the current background so it looks "cut out" */ | ||
| border: 3px solid var(--md-default-bg-color, #ffffff); | ||
| } | ||
|
|
||
| .nt-timeline.vertical.left .nt-timeline-dot { | ||
| left: 21px; | ||
| top: 8px; | ||
| } | ||
|
|
||
| /* Larger dot variant (used when an icon is present) */ | ||
| .nt-timeline-dot.bigger { | ||
| width: 40px; | ||
| height: 40px; | ||
| padding: 3px; | ||
| } | ||
|
|
||
| .nt-timeline.vertical.left .nt-timeline-dot.bigger { | ||
| top: 0; | ||
| left: 10px; | ||
| } | ||
|
|
||
| .nt-timeline-dot .icon { | ||
| color: var(--dark, #060809); | ||
| position: relative; | ||
| top: 1px; | ||
| } | ||
|
|
||
| /* ------------------------------------------------------------------ */ | ||
| /* Subtitle (date / label shown to the left) */ | ||
| /* ------------------------------------------------------------------ */ | ||
|
|
||
| .nt-timeline-sub-title { | ||
| position: absolute; | ||
| top: 4px; | ||
| margin-top: 0; | ||
| font-size: 0.7rem; | ||
| color: var(--md-default-fg-color--light, #425c67); | ||
| } | ||
|
|
||
| .nt-timeline.vertical.left .nt-timeline-sub-title { | ||
| left: -100px; | ||
| width: 100px; | ||
| } | ||
|
|
||
| /* Dark mode: use the slate-scheme mapped value */ | ||
| [data-md-color-scheme="slate"] .nt-timeline-sub-title { | ||
| color: var(--md-default-fg-color--light, #abc0c9); | ||
| } | ||
|
|
||
| /* ------------------------------------------------------------------ */ | ||
| /* Content block */ | ||
| /* ------------------------------------------------------------------ */ | ||
|
|
||
| .nt-timeline-title { | ||
| font-size: 0.85rem; | ||
| font-weight: 600; | ||
| margin-top: 0; | ||
| } | ||
|
|
||
| .nt-timeline-content { | ||
| font-size: 0.75rem; | ||
| border-bottom: 2px dashed var(--border-color, #e9eff1); | ||
| padding-bottom: 1.2rem; | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
.nt-timeline-beforeand.nt-timeline-aftersetcontent: "", butcontentonly applies to pseudo-elements (::before/::after) and has no effect on normal elements. Consider removing these declarations (or switching the selectors to pseudo-elements if that was the intent) to avoid confusion and keep the CSS semantically correct.