Skip to content

Commit

Permalink
chore(webapp): migrate css deep operator
Browse files Browse the repository at this point in the history
preparation for vue3
add eslint rule
  • Loading branch information
Rotzbua committed Jan 25, 2024
1 parent 82814f8 commit 6e42ba8
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 18 deletions.
3 changes: 3 additions & 0 deletions www/webapp/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module.exports = {
// 'plugin:vue/recommended',
'plugin:vuetify/base',
'plugin:import/recommended',
'plugin:vue-scoped-css/recommended', // vue2
'eslint:recommended',
],
settings: {
Expand All @@ -37,6 +38,8 @@ module.exports = {
'vue/no-deprecated-filter': 'warn', // Preparation for vue3
'vue/no-deprecated-v-on-number-modifiers': 'warn', // Preparation for vue3
'vue/no-deprecated-html-element-is': 'warn', // Preparation for vue3
'vue-scoped-css/enforce-style-type': 'off',
'vue-scoped-css/no-deprecated-deep-combinator': 'warn', // Preparation for vue3
'vue/match-component-file-name': ['error', {'extensions': ['vue'], 'shouldMatchCase': true}],
},
ignorePatterns: ['**/src/modules/**/*'],
Expand Down
1 change: 1 addition & 0 deletions www/webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-vue": "^9.15.1",
"eslint-plugin-vue-scoped-css": "^2.6.1",
"eslint-plugin-vuetify": "^1.1.0",
"sass": "~1.32.13",
"unplugin-vue-components": "^0.26.0",
Expand Down
2 changes: 1 addition & 1 deletion www/webapp/src/components/Field/RecordList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export default {
};
</script>
<style scoped>
table >>> td:last-child {
table ::v-deep td:last-child {
padding-right: 4px;
}
</style>
14 changes: 7 additions & 7 deletions www/webapp/src/views/CrudList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -702,29 +702,29 @@ export default {
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
>>> tr:not(.v-data-table__empty-wrapper) td {
::v-deep tr:not(.v-data-table__empty-wrapper) td {
vertical-align: top;
}
/* If this is on tr instead of td, it doesn't work for the first one */
>>> tr.successFade td {
::v-deep tr.successFade td {
animation: successFade 1s;
}
>>> tr.successFade:focus-within td {
::v-deep tr.successFade:focus-within td {
animation: none;
}
@keyframes successFade {
from { background-color: forestgreen; }
}
>>> tr.orange .button-save .v-icon, >>> tr.red .button-save .v-icon {
::v-deep tr.orange .button-save .v-icon, ::v-deep tr.red .button-save .v-icon {
color: forestgreen;
}
>>> tr:focus-within :focus {
::v-deep tr:focus-within :focus {
background-color: #FFFFFF;
}
>>> tbody tr > :hover {
::v-deep tbody tr > :hover {
cursor: pointer;
}
>>> tbody tr.text--disabled > :hover {
::v-deep tbody tr.text--disabled > :hover {
cursor: auto;
}
</style>
20 changes: 10 additions & 10 deletions www/webapp/src/views/CrudListRecord.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,38 +124,38 @@ export default {

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
>>> tr:not(.v-data-table__empty-wrapper) td {
::v-deep tr:not(.v-data-table__empty-wrapper) td {
vertical-align: top;
}
>>> .v-data-table .v-data-table__mobile-row {
::v-deep .v-data-table .v-data-table__mobile-row {
height: auto;
margin: -11px 0;
}
>>> .theme--light.v-data-table > .v-data-table__wrapper > table > tbody > tr:not(:last-child).v-data-table__mobile-table-row > td:last-child {
::v-deep .theme--light.v-data-table > .v-data-table__wrapper > table > tbody > tr:not(:last-child).v-data-table__mobile-table-row > td:last-child {
border-bottom-width: 4px;
}
>>> .theme--light.v-data-table > .v-data-table__wrapper > table {
::v-deep .theme--light.v-data-table > .v-data-table__wrapper > table {
width: 100%;
}
@media screen and (min-width: 600px) {
>>> .theme--light.v-data-table > .v-data-table__wrapper > table > tbody > tr > td:nth-child(3),
>>> .theme--light.v-data-table > .v-data-table__wrapper > table > tbody > tr > td:nth-child(3) > div{
::v-deep .theme--light.v-data-table > .v-data-table__wrapper > table > tbody > tr > td:nth-child(3),
::v-deep .theme--light.v-data-table > .v-data-table__wrapper > table > tbody > tr > td:nth-child(3) > div{
width: 45vw;
}
}
>>> tr.successFade td {
::v-deep tr.successFade td {
animation: successFade 1s;
}
>>> tr.successFade:focus-within td {
::v-deep tr.successFade:focus-within td {
animation: none;
}
@keyframes successFade {
from { background-color: forestgreen; }
}
>>> tr:focus-within .button-save .v-icon {
::v-deep tr:focus-within .button-save .v-icon {
color: forestgreen;
}
>>> tr:focus-within :focus {
::v-deep tr:focus-within :focus {
background-color: #FFFFFF;
}
</style>

0 comments on commit 6e42ba8

Please sign in to comment.