[TikiWiki-commits] [Git][tikiwiki/tiki][master] [ENH] Refactor wiki help layout to use CSS Grid for improved responsiveness and structure
Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <68dd3477d9f3d_2cded64430bb@gitlab-sidekiq-low-urgency-cpu-bound-v2-b97b86db8-mc4q8.mail> |
Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
e611d8ee by Yves Ngalamulume at 2025-10-01T13:53:38+00:00
[ENH] Refactor wiki help layout to use CSS Grid for improved responsiveness and structure
---
* [ENH] Refactor wiki help layout to use CSS Grid for improved responsiveness and structure
See merge request tikiwiki/tiki!8662
- - - - -
2 changed files:
- templates/tiki-edit_help.tpl
- themes/base_files/scss/_tiki-miscellaneous_global.scss
Changes:
=====================================
templates/tiki-edit_help.tpl
=====================================
@@ -14,7 +14,7 @@
{/remarksbox}
{/if}
-<div class="wiki-help-masonry">
+<div class="wiki-help-grid">
{if (!isset($wysiwyg) or $wysiwyg ne 'y') or (isset($wysiwyg) and $wysiwyg eq 'y' and $prefs.wysiwyg_wiki_parsed eq 'y')}
<div class="help-item">{icon name='bold'} <strong>{tr}Bold text{/tr}</strong> __{tr}text{/tr}__</div>
<div class="help-item">{icon name='italic'} <strong>{tr}Italic text{/tr}</strong> 2 {tr}single quotes{/tr} ('). '"{tr}text{/tr}"'</div>
=====================================
themes/base_files/scss/_tiki-miscellaneous_global.scss
=====================================
@@ -895,30 +895,21 @@ ul.sm-horizontal {
display: block;
}
}
-
-// Wiki help masonry layout
-.wiki-help-masonry {
- column-count: 1;
- column-gap: 1rem;
+.wiki-help-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
+ gap: 1rem;
width: 100%;
- overflow: hidden;
}
-
-// Each help item is a card-like box
.help-item {
- display: inline-block;
- width: 100%;
- break-inside: avoid;
- margin-bottom: 1rem;
padding: 0.75rem;
- background: #f8f9fa;
- border: 1px solid #ddd;
+ background-color: var(--bs-secondary-bg);
+ color: var(--bs-body-color);
+ border: 1px solid var(--bs-border-color);
border-radius: 0.25rem;
box-shadow: 0 1px 2px rgba(0,0,0,0.05);
word-wrap: break-word;
}
-
-// Ensure tables, pre, and code blocks within help items are responsive
.help-item table,
.help-item pre,
.help-item code {
@@ -926,8 +917,3 @@ ul.sm-horizontal {
overflow-x: auto;
display: block;
}
-
-// Responsive column counts based on viewport width
-@media (min-width: 576px) { .wiki-help-masonry { column-count: 2; } }
-@media (min-width: 992px) { .wiki-help-masonry { column-count: 3; } }
-@media (min-width: 1400px) { .wiki-help-masonry { column-count: 4; } }
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/e611d8ee25d1aa51d986ca6e0998e0e054add89c
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/e611d8ee25d1aa51d986ca6e0998e0e054add89c
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs