Repository navigation
Release v0.4.2 - #178
Merged
Merged
Release v0.4.2#178
Conversation
… rules v0.4.1 started forwarding the host's browser targets to postcss-preset-env, which then skipped the nesting-rules transform for browsers that support nesting natively. The attacher styles that hold a tooltip or popover at opacity 0 until it is shown are nested, and ember-cli's clean-css minifier cannot parse nesting: it emitted them as top-level `& > …` selectors that match nothing, so every attachment rendered visible in production without a hover. Development builds looked fine because the browser parsed the nested block itself. Force nesting-rules on regardless of targets, and add a node test that compiles the attacher styles for the console's targets, asserts the flat hide rule, and minifies the result with clean-css. Prepare the v0.4.2 patch release.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Patch release for v0.4.2: restores the hidden state of every
Attach::TooltipandAttach::Popoverin production builds. The sitting release (component playground, signature pad, coverage) moved torelease/v0.4.3/ #177 so this ships first.What broke
v0.4.1 (#176,
434196f) started forwarding the host's browser targets topostcss-preset-env. With the console's targets (last 1 Chrome/Firefox/Safari versions) the preset skips thenesting-rulestransform, because those browsers support nesting natively. The attacher styles that keep an attachment atopacity: 0until it is shown are written nested, and ember-cli's production minifier (clean-css 5) cannot parse nesting: it emitted those rules as top-level& > .ember-attacher-fillselectors that match nothing, so every tooltip and popover rendered at full opacity without a hover. Development builds were unaffected because the browser parsed the nested block itself, which is why it reached production.The popover component itself is not at fault; its v0.4.1 changes only affect interactive attachments.
Fix
lib/postcss-options.js:postcssPresetEnv({ …, features: { 'nesting-rules': true } })so nesting is always flattened, whatever the targets.tests/node/postcss-build-test.cjs: compilesattacher.cssfor the console's targets, asserts the flat hide rule is present with no&left, then minifies with the same clean-css ember-cli uses and asserts the rule survives. Fails onmain, passes here.package.json→0.4.2,RELEASE.mdfirst line names v0.4.2 sorelease.ymltags on merge.Verification
node --test tests/node/postcss-build-test.cjs: 4 pass (the new test fails with the fix reverted).ember build --environment=productionof the dummy app: the minified vendor CSS contains.ember-attacher[x-placement^=top]>.ember-attacher-fill{…;opacity:0}for all four placements and no nesting leftovers; before the fix the console's builtvendor.csshad only the nested form.