fix: align OneNote workspace with Toolbox shell
This commit is contained in:
21
src/application-width.test.ts
Normal file
21
src/application-width.test.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { readFile } from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
describe('application width', () => {
|
||||
it('uses the complete width supplied by the shared Toolbox shell', async () => {
|
||||
const stylesheet = await readFile(
|
||||
path.join(process.cwd(), 'src', 'styles.css'),
|
||||
'utf8'
|
||||
);
|
||||
const applicationRules = Array.from(
|
||||
stylesheet.matchAll(/\.application\s*\{([^}]*)\}/g),
|
||||
(match) => match[1] ?? ''
|
||||
);
|
||||
|
||||
expect(applicationRules).not.toHaveLength(0);
|
||||
expect(applicationRules.join('\n')).toMatch(/\bwidth:\s*100%;/);
|
||||
expect(applicationRules.join('\n')).not.toMatch(/\bwidth:\s*min\(/);
|
||||
});
|
||||
});
|
||||
@@ -106,7 +106,7 @@ body {
|
||||
.application {
|
||||
display: grid;
|
||||
gap: 1.25rem;
|
||||
width: min(76rem, calc(100% - 2rem));
|
||||
width: 100%;
|
||||
margin: 2rem auto;
|
||||
}
|
||||
|
||||
@@ -801,7 +801,6 @@ body {
|
||||
|
||||
@media (max-width: 760px) {
|
||||
.application {
|
||||
width: min(100% - 1rem, 76rem);
|
||||
margin: 0.75rem auto;
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const APP_VERSION = '0.3.2';
|
||||
export const APP_VERSION = '0.3.3';
|
||||
|
||||
Reference in New Issue
Block a user