diff options
author | Shiny Nematoda <snematoda.751k2@aleeas.com> | 2024-06-15 22:16:18 +0200 |
---|---|---|
committer | Earl Warren <earl-warren@noreply.codeberg.org> | 2024-06-15 22:16:18 +0200 |
commit | 53d4e904111c8e7d0c6b900c3c5bffc441531c1d (patch) | |
tree | 147a2ebfa3c73caa1699a067b66b5def07d925dc /tailwind.config.js | |
parent | Move global issue/pull sidebar filter into an option (#4096) (diff) | |
download | forgejo-53d4e904111c8e7d0c6b900c3c5bffc441531c1d.tar.xz forgejo-53d4e904111c8e7d0c6b900c3c5bffc441531c1d.zip |
[FEAT] folding results for repo search (#4134)
closes #3855
unlike #3854, this implementation uses a generic details html tag and a bit of tailwind magic...
---
## Maintainers Note
- previously tailwind classes of the form `[-a-zA-Z:0-9_.]` was disabled, however they were enabled since they were required for the `group-open:` classes
---
## Manual Testing
1. Visit the code search results after submitting a valid query for repo (if indexer disabled) or repo, user, explore (if indexer enabled)
2. Verify thst
1. the results are unfloded/open by default
2. the chevron points down when open and right when closed
<video src="/attachments/5a55c56f-6159-4422-ab80-962e0121e7d2" title="fold2.mp4" controls></video>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4134
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
Diffstat (limited to 'tailwind.config.js')
-rw-r--r-- | tailwind.config.js | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/tailwind.config.js b/tailwind.config.js index 8f3e8c8251..42962b972b 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -44,8 +44,6 @@ export default { 'backdrop-filter', // we use double-class tw-hidden defined in web_src/css/helpers.css for increased specificity 'hidden', - // unneeded classes - '[-a-zA-Z:0-9_.]', ], theme: { colors: { @@ -101,6 +99,22 @@ export default { }, plugins: [ plugin(({addUtilities}) => { + // base veriables required for tranform utilities + // added as utilities since base is not imported + // note: required when using tailwind's transform classes + addUtilities({ + '.transform-reset': { + '--tw-translate-x': 0, + '--tw-translate-y': 0, + '--tw-rotate': 0, + '--tw-skew-x': 0, + '--tw-skew-y': 0, + '--tw-scale-x': '1', + '--tw-scale-y': '1', + }, + }); + }), + plugin(({addUtilities}) => { addUtilities({ // tw-hidden must win all other "display: xxx !important" classes to get the chance to "hide" an element. // do not use: |