Fork 0
Commit Graph

21 Commits

Author SHA1 Message Date
silverwind f4b92578b4
Add tailwindcss (#29357)
This will get tailwindcss working on a basic level. It provides only the
utility classes, e.g. no tailwind base which we don't need because we
have our own CSS reset. Without the base, we also do not have their CSS
variables so a small amount of features do not work and I removed the
generated classes for them.

***Note for future developers: This currently uses a `tw-` prefix, so we
use it like `tw-p-3`.***

<summary>Currently added CSS, all false-positives</summary>


    visibility: visible !important


    visibility: visible


    visibility: hidden


    visibility: collapse


    position: static


    position: fixed !important


    position: absolute


    position: relative


    position: sticky


    left: 2.5rem


    isolation: isolate


    float: right


    float: left


    margin-right: 0.5rem


    margin-right: 0.75rem


    display: block !important


    display: block


    display: inline-block


    display: inline


    display: flex


    display: inline-flex


    display: table !important


    display: inline-table


    display: table-caption


    display: table-cell


    display: table-column


    display: table-column-group


    display: table-footer-group


    display: table-header-group


    display: table-row-group


    display: table-row


    display: flow-root


    display: inline-grid


    display: contents


    display: list-item


    display: none !important


    display: none


    flex-shrink: 1


    flex-shrink: 1


    flex-grow: 1


    flex-grow: 1


    border-collapse: collapse


    user-select: all


    resize: both


    flex-wrap: wrap


    overflow: visible


    border-radius: 0.25rem


    border-width: 1px


    text-align: justify


    text-transform: uppercase


    text-transform: lowercase


    text-transform: capitalize


    font-style: italic


    color: var(--color-red)


    color: var(--color-shadow)


    text-decoration-line: underline


    text-decoration-line: overline


    text-decoration-line: line-through


    outline-style: solid


    transition-timing-function: cubic-bezier(0.4, 0, 1, 1)


    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1)


    transition-timing-function: cubic-bezier(0, 0, 0.2, 1)



Co-authored-by: Giteabot <teabot@gitea.io>
2024-02-25 17:46:46 +01:00
silverwind a062725758
Update JS and PY dependencies, build for `es2020` browsers (#28977)
- Update all JS dependencies minus @mcaptcha/vanilla-glue
- Fix new lint errors
- Regenerate SVGs
- Switch to maintained stylelint stylistic plugin
- Tested Mermaid, Citation, Swagger, sorting
- Raise ESBuild target to `es2020` as dictated by `pretty-ms`
2024-02-02 09:36:32 +00:00
silverwind ce55a74374
Update JS dependencies (#28537)
- Update all JS dependencies excluding mcaptcha (breaking changes) and
stylelint (plugin not compatible with v16)
- Regenerate SVGs
- Update markdownlint rule names
- Fix one issue of heading in markdown discovered during lint
- Update for monaco options renames
- Fix stylelint rule length-zero-no-unit for custom properties
- Tested editor, swagger, sorting, vue, lint
2023-12-30 05:29:03 +00:00
silverwind 532f166c4d
Enable shorthands in `declaration-strict-value` linter (#27597)
Enable [shorthand
in this lint rule and match color properties by regex. Patterns like
this will now fail lint:

background: #123456;
border: 1px sold rgba(0,0,0,0);
2023-10-13 08:19:21 +00:00
silverwind 2b6f224336
Update JS dependencies (#26025)
- Update all JS dependencies
- Tweak eslint config, disable SequenceExpression aka. [Comma
remove deprecated rule
- Add new stylelint rule
- Tested Monaco and Swagger
2023-07-21 11:34:10 +08:00
silverwind b943318617
Update JS dependencies and misc tweaks (#25540)
- Update all JS dependencies
- Enable `declaration-property-unit-disallowed-list` to forbid `em` on
- Rename dependency update targets to `update-js` and `update-py` and
document them
- Remove margin on Asciicast viewer
- Tested Swagger, Katex, Asciicast

<img width="1243" alt="Screenshot 2023-06-27 at 19 51 05"
2023-06-27 21:44:17 +02:00
silverwind f47744c3f1
Update JS dependencies, remove space after emoji completion (#25266)
- Update all JS dependencies
- Enable stylint
- Make use of new features in webpack and text-expander-element
- Tested Swagger and Mermaid

To explain the `text-expander-element` change: Before this version, the
element added a unavoidable space after emoji completion. Now that
https://github.com/github/text-expander-element/pull/36 is in, we gain
control over this space and I opted to remove it for emoji completion
and retain it for `@` mentions.


Co-authored-by: Giteabot <teabot@gitea.io>
2023-06-18 08:38:47 +00:00
silverwind 61e0827f42
Add `stylelint-declaration-block-no-ignored-properties` (#25284)
and fix discovered issue. There is no visual difference in these markup
code blocks.
2023-06-18 04:22:09 +00:00
silverwind 3ee8970419
add `stylelint-stylistic` (#25285)
autofix all issues with two manual tweaks. This restores all the
stylistic rules removed in Stylelint 15.
2023-06-17 13:20:32 +00:00
silverwind 64e0672e3b
Fix `@font-face` overrides (#24855)
Fixes: https://github.com/go-gitea/gitea/issues/24850

Not sure how to do it for asian fonts only, so let's revert to previous
value for now.

### Before
<img width="414" alt="Screenshot 2023-05-22 at 10 34 10"

### After
<img width="416" alt="Screenshot 2023-05-22 at 10 34 04"
2023-05-24 01:48:51 +00:00
silverwind a9d417341c
Run stylelint on .vue files (#24865)
- Run stylelint on .vue files
- Fix discovered issues
- Suppress warning spam from `declaration-strict-value` rule

Co-authored-by: Giteabot <teabot@gitea.io>
2023-05-23 13:54:21 +00:00
silverwind 19993d8814
Change `--font-weight-bold` to `--font-weight-semibold` and 600 value, introduce new font weight variables (#24827)
There was some recent discussion about this in Discord `ui-design`
channel and the conclusion was that
https://github.com/go-gitea/gitea/issues/24305 should have fixed their
OS font installation to have semibold weights.

I have now tested this 601 weight on a Windows 10 machine on Firefox
myself, and I immediately noticed that bold was excessivly bold and
rendering as 700 because browsers are biased towards bolder fonts. So
revert this back to the previous value.
2023-05-21 23:37:32 +00:00
silverwind b926f96da7
Reorganize CSS files (#24739)
Reorganize various CSS files for clarity, group together by subdirectory
in `index.css`. This reorders some of the rules, but I don't think it
should introduce any issues because of that.
2023-05-16 00:13:30 -04:00
silverwind 3ae997614a
Enhance stylelint rule config, remove dead CSS (#24472)
Make this stylelint rule match on more properties.

The dead CSS relates to the navbar, which currently has classes:

ui top secondary stackable main menu following bar light

Which means `.following.bar .top.menu` can never match, so remove this
dead CSS as well as inactive `z-index` and `left` on it.

Commits table striping becomes more visible on dark theme, but I don't
think it's worth introducing a new color until
https://github.com/go-gitea/gitea/pull/24423 is ready, which would have
to remove it again:

<img width="668" alt="Screenshot 2023-05-01 at 18 41 49"
<img width="680" alt="Screenshot 2023-05-01 at 18 41 41"
2023-05-02 23:15:52 -04:00
silverwind af4c178452
Update JS deps (#23853)
- Update all JS dependencies
- Regenerate svgs
- Tested heatmap, swagger, citation
2023-04-02 19:47:14 -04:00
silverwind 202803fc69
Replace Less with CSS (#23481)
Ran most of the Less files through the Less compiler and Prettier and
then followed up with a round of manual fixes.

The Less compiler had unfortunately stripped all `//` style comments
that I had to restore (It did preserve `/* */` comments). Other fixes
include duplicate selector removal which were revealed after the
transpilation and which weren't caught by stylelint before but now are.

Fixes: https://github.com/go-gitea/gitea/issues/15565
2023-03-14 22:20:19 -04:00
wxiaoguang 0141d1667d
Fix broken Chroma CSS styles (#23174)
The CSS styles in Gitea themes are out-of-sync of Chroma's styles.

This PR introduces a `chroma-style-diff.go` tool to compare the diff.
The missing CSS styles have been added manually. They are left as empty
to reduce arguments because there was no color for them before.

And this PR fixes #22348, with just 2 lines changed: `.chroma .kt & .n`,
these colors are taken from GitHub.

It's good enough for #22348



Co-authored-by: silverwind <me@silverwind.io>
2023-03-09 22:16:16 -05:00
silverwind 77f70bd5a3
Upgrade to stylelint 15 (#22944)
- Upgrade stylelint and plugin
- Change ruleset to a explicit one, with all deprecated rules removed
- Fix new issues detected by value validation

For `overflow: overlay` see
2023-02-21 09:23:45 -06:00
silverwind ee21d5453f
Move all remaining colors into CSS variables (#21903)
This should eliminate all non-variable color usage in the styles, making
gitea fully themeable via CSS variables. Also, it adds a linter to
enforce variables for colors.
2022-11-23 08:22:27 +08:00
silverwind b1dd1ba48f
Update JS dependencies and misc tweaks (#21583)
- Update all JS dependencies to latest version
- Disable two redundant eslint rules
- Adapt stylelint config to codebase
- Regenerate SVGs
- Make file editor spinner "reserve" height so page does not shift
- Tested katex, swagger, monaco

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
2022-10-28 09:40:50 -04:00
silverwind 48ef12b27c
Move eslintrc/stylelintrc to non-deprecated extensions (#20110) 2022-06-24 14:09:53 +02:00