Merge remote-tracking branch 'origin/develop' into navigation-update
* origin/develop: (49 commits) Fix react & extra buttons not styled on tab-focus Fix popover not popping up Fix styling on Safari Use :focus-visible instead of :focus for focus markers Optimize Reply badge position Add badges to status interacting buttons Update dependency nightwatch to v2 Update dependency eslint-plugin-n to v15.2.5 Update dependency mocha to v10 Update dependency karma-coverage to v2 Update dependency sass to v1.54.5 Update dependency karma-firefox-launcher to v2 Update dependency vue-template-compiler to v2.7.9 Pin dependencies Refresh yarn.lock Allow column width configuration: allow stretching navbar with columns Remove legacy code for chunksSortMode Add FIXME comment about html-webpack-plugin-after-emit Use exact webpack version in package.json Reintroduce css minimizer ...
This commit is contained in:
commit
7b6745bb84
39 changed files with 2409 additions and 3714 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import runtime from 'serviceworker-webpack-plugin/lib/runtime'
|
||||
import runtime from 'serviceworker-webpack5-plugin/lib/runtime'
|
||||
|
||||
function urlBase64ToUint8Array (base64String) {
|
||||
const padding = '='.repeat((4 - base64String.length % 4) % 4)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { convert } from 'chromatism'
|
||||
import { rgb2hex, hex2rgb, rgba2css, getCssColor, relativeLuminance } from '../color_convert/color_convert.js'
|
||||
import { getColors, computeDynamicColor, getOpacitySlot } from '../theme_data/theme_data.service.js'
|
||||
import { defaultState } from '../../modules/config.js'
|
||||
|
||||
export const applyTheme = (input) => {
|
||||
const { rules } = generatePreset(input)
|
||||
|
|
@ -20,6 +21,36 @@ export const applyTheme = (input) => {
|
|||
body.classList.remove('hidden')
|
||||
}
|
||||
|
||||
const configColumns = ({ sidebarColumnWidth, contentColumnWidth, notifsColumnWidth }) =>
|
||||
({ sidebarColumnWidth, contentColumnWidth, notifsColumnWidth })
|
||||
|
||||
const defaultConfigColumns = configColumns(defaultState)
|
||||
|
||||
export const applyConfig = (config) => {
|
||||
const columns = configColumns(config)
|
||||
|
||||
if (columns === defaultConfigColumns) {
|
||||
return
|
||||
}
|
||||
|
||||
const head = document.head
|
||||
const body = document.body
|
||||
body.classList.add('hidden')
|
||||
|
||||
const rules = Object
|
||||
.entries(columns)
|
||||
.filter(([k, v]) => v)
|
||||
.map(([k, v]) => `--${k}: ${v}`).join(';')
|
||||
|
||||
const styleEl = document.createElement('style')
|
||||
head.appendChild(styleEl)
|
||||
const styleSheet = styleEl.sheet
|
||||
|
||||
styleSheet.toString()
|
||||
styleSheet.insertRule(`:root { ${rules} }`, 'index-max')
|
||||
body.classList.remove('hidden')
|
||||
}
|
||||
|
||||
export const getCssShadow = (input, usesDropShadow) => {
|
||||
if (input.length === 0) {
|
||||
return 'none'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue