-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breakpoint redfinition at compiled CSS "optimization" time #17629
Comments
General ideaWhat I'd imagine this to look like:
Possible solutionsWebPack processAssetsPart of WebPack >= 5 As seen in https://stackoverflow.com/a/65529189 content-replace-webpack-pluginLast release: 2020 https://www.npmjs.com/package/content-replace-webpack-plugin webpack-plugin-replaceLast release: 2019 https://www.npmjs.com/package/webpack-plugin-replace css-rewrite-webpack-pluginLast release: 2016 I guess this is specific to CSS? We probably don't need it to be specific, really. https://www.npmjs.com/package/css-rewrite-webpack-plugin |
Esbuild's main configuration now lives in build.js Fixes cockpit-project#17629
Esbuild's main configuration now lives in build.js Fixes cockpit-project#17629
Esbuild's main configuration now lives in build.js TODO: [ ] Fix LICENSE parsing for debian Fixes cockpit-project#17629
Esbuild's main configuration now lives in build.js TODO: [ ] Fix LICENSE parsing for debian Fixes cockpit-project#17629
Esbuild's main configuration now lives in build.js TODO: [ ] Fix LICENSE parsing for debian Fixes cockpit-project#17629
Esbuild's main configuration now lives in build.js TODO: [ ] Fix LICENSE parsing for debian Fixes cockpit-project#17629
Esbuild's main configuration now lives in build.js TODO: [ ] Fix LICENSE parsing for debian Fixes cockpit-project#17629
Esbuild's main configuration now lives in build.js TODO: [ ] Fix LICENSE parsing for debian Fixes cockpit-project#17629
Esbuild's main configuration now lives in build.js TODO: [ ] Fix LICENSE parsing for debian Fixes cockpit-project#17629
Esbuild's main configuration now lives in build.js TODO: [ ] Fix LICENSE parsing for debian Fixes cockpit-project#17629
Esbuild's main configuration now lives in build.js TODO: [ ] Fix LICENSE parsing for debian Fixes cockpit-project#17629
Esbuild's main configuration now lives in build.js TODO: [ ] Fix LICENSE parsing for debian Fixes cockpit-project#17629
Esbuild's main configuration now lives in build.js TODO: [ ] Fix LICENSE parsing for debian Fixes cockpit-project#17629
Esbuild's main configuration now lives in build.js Fixes cockpit-project#17629
Esbuild's main configuration now lives in build.js Fixes cockpit-project#17629
We don't need the `$ESLINT`/`$STYLELINT` env variables any more to coordinate between build.js and webpack-config.js, as everything is in build.js now. Update HACKING.md accordingly. Co-Authored-By: Martin Pitt <mpitt@redhat.com> Fixes cockpit-project#17629
We don't need the `$ESLINT`/`$STYLELINT` env variables any more to coordinate between build.js and webpack-config.js, as everything is in build.js now. Update HACKING.md accordingly. Co-Authored-By: Martin Pitt <mpitt@redhat.com> Fixes cockpit-project#17629
We don't need the `$ESLINT`/`$STYLELINT` env variables any more to coordinate between build.js and webpack-config.js, as everything is in build.js now. Update HACKING.md accordingly. Co-Authored-By: Martin Pitt <mpitt@redhat.com> Fixes cockpit-project#17629
We don't need the `$ESLINT`/`$STYLELINT` env variables any more to coordinate between build.js and webpack-config.js, as everything is in build.js now. Update HACKING.md accordingly. Co-Authored-By: Martin Pitt <mpitt@redhat.com> Fixes cockpit-project#17629
We don't need the `$ESLINT`/`$STYLELINT` env variables any more to coordinate between build.js and webpack-config.js, as everything is in build.js now. Update HACKING.md accordingly. Co-Authored-By: Martin Pitt <mpitt@redhat.com> Fixes cockpit-project#17629
We don't need the `$ESLINT`/`$STYLELINT` env variables any more to coordinate between build.js and webpack-config.js, as everything is in build.js now. Update HACKING.md accordingly. Implement our own watch mode due to the deficiencies of esbuild's [1]. This is similar to podman's [2], but with recursive watching. Because the approach for redefining breakpoints changed, update pixel tests for the spacing noise. Co-Authored-By: Martin Pitt <mpitt@redhat.com> Fixes cockpit-project#17629 [1] evanw/esbuild#1204 (comment) [2] cockpit-project/cockpit-podman#1243
We don't need the `$ESLINT`/`$STYLELINT` env variables any more to coordinate between build.js and webpack-config.js, as everything is in build.js now. Update HACKING.md accordingly. Implement our own watch mode due to the deficiencies of esbuild's [1]. This is similar to podman's [2], but with recursive watching. Because the approach for redefining breakpoints changed, update pixel tests for the spacing noise. Co-Authored-By: Martin Pitt <mpitt@redhat.com> Fixes cockpit-project#17629 [1] evanw/esbuild#1204 (comment) [2] cockpit-project/cockpit-podman#1243
We don't need the `$ESLINT`/`$STYLELINT` env variables any more to coordinate between build.js and webpack-config.js, as everything is in build.js now. Update HACKING.md accordingly. Implement our own watch mode due to the deficiencies of esbuild's [1]. This is similar to podman's [2], but with recursive watching. Because the approach for redefining breakpoints changed, update pixel tests for the spacing noise. Co-Authored-By: Martin Pitt <mpitt@redhat.com> Fixes cockpit-project#17629 [1] evanw/esbuild#1204 (comment) [2] cockpit-project/cockpit-podman#1243
Background: Cockpit uses iframes and PatternFly completely ignores iframes. Therefore, everything outside of the iframe eats away pixels from the document inside the iframe. So PatternFly's assumption of the navigation isn't taken into account when the navigation is outside the iframe (like in Cockpit) instead of inside (like with OpenShift and what PatternFly does by default).
Therefore: We've been jumping through hoops and redefining the breakpoint variables at the SCSS compilation level.
This still has several problems:
I've brought up this problem with the PatternFly team multiple times over the past several years, including my latest attempt from last year with a table, screenshots, and some example code @ patternfly/patternfly#4511... without any traction.
So, unless PatternFly finally fixes this in their codebase, we currently only have 4 options:
I think the lesser evil of these 4 options is to rewrite* the CSS, especially as we're drastically rewriting our CSS with a "CSS optimizer" anyway (and that definitely has broken things in production code).
(* To be clear: Here, I mean have it programmatically rewritten at build time, like regular expressions.)
Our changes would amount to looking for a line that begins with
@media
and change the followingpx
sizes:So,
sm
would bes/576px/236px/g
for@media
lines,md
would bes/768px/428/g
, and so on.The end result is that we wouldn't have to care about breakpoints while writing JSX and SCSS code. Everything should "just work" from the viewpoint of development and what Cockpit's end users see.
(Of course, we'd want to make this adaptable for
cockpit-
* projects too.)The text was updated successfully, but these errors were encountered: