mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-07-12 12:37:57 +00:00
chore: have stylelint lint CSS in tmpl files to enforce RTL-friendly logical properties (#13216)
This will allow us to enforce RTL-friendly logical CSS properties in the go template files. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/13216 Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
parent
47ae5e6841
commit
1a277ad0b8
7 changed files with 17 additions and 6 deletions
2
Makefile
2
Makefile
|
|
@ -153,7 +153,7 @@ TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(FOMAN
|
|||
GO_DIRS := build cmd models modules routers services tests
|
||||
WEB_DIRS := web_src/js web_src/css
|
||||
|
||||
STYLELINT_FILES := web_src/css web_src/js/components/*.vue
|
||||
STYLELINT_FILES := web_src/css web_src/js/components/*.vue templates/**/*.tmpl
|
||||
SPELLCHECK_FILES := $(GO_DIRS) $(WEB_DIRS) docs/content templates options/locale/locale_en-US.ini .github $(wildcard *.go *.js *.ts *.vue *.md *.yml *.yaml)
|
||||
|
||||
GO_SOURCES := $(wildcard *.go)
|
||||
|
|
|
|||
|
|
@ -36,6 +36,17 @@ export default {
|
|||
files: ['**/*.vue'],
|
||||
customSyntax: 'postcss-html',
|
||||
},
|
||||
{
|
||||
files: '**/*.tmpl',
|
||||
ignoreFiles: [
|
||||
'templates/shared/quota_overview.tmpl', // // the mix of go in the style attribute confuses the css parser
|
||||
],
|
||||
customSyntax: 'postcss-html',
|
||||
rules: {
|
||||
'@stylistic/indentation': null,
|
||||
'scale-unlimited/declaration-strict-value': null,
|
||||
},
|
||||
},
|
||||
],
|
||||
rules: {
|
||||
'@stylistic/at-rule-name-case': null,
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
</div>
|
||||
<style>
|
||||
.ui.message.flash-message {
|
||||
text-align: left;
|
||||
text-align: start;
|
||||
}
|
||||
.form-fetch-action {
|
||||
margin-bottom: 1em;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
<style>
|
||||
ul {
|
||||
line-height: 2em;
|
||||
line-height: 2rem;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
|
||||
<style>
|
||||
blockquote { padding-left: 1em; margin: 1em 0; border-left: 1px solid grey; color: #777}
|
||||
blockquote { padding-inline-start: 1em; margin: 1em 0; border-inline-start: 1px solid grey; color: #777}
|
||||
.footer { font-size:small; color:#666;}
|
||||
</style>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{{if .Repository.IsFlagged $.Context}}
|
||||
<div class="ui info message" style="text-align: left">
|
||||
<div class="ui info message" style="text-align: start">
|
||||
<strong>{{ctx.Locale.Tr "repo.admin.enabled_flags"}}</strong>
|
||||
{{range .Repository.ListFlags $.Context}}
|
||||
<span class="ui label">{{.Name}}</span>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
<div role="main" class="page-content status-page-500">
|
||||
<div class="ui container" >
|
||||
<style> .ui.message.flash-message { text-align: left; } </style>
|
||||
<style> .ui.message.flash-message { text-align: start; } </style>
|
||||
{{template "base/alert" .}}
|
||||
</div>
|
||||
<div class="ui container center">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue