Closed dancormier closed 6 months ago
Name | Link |
---|---|
Latest commit | 14d2524e2257bfd540e26ece2758a1d120218af6 |
Latest deploy log | https://app.netlify.com/sites/stacks/deploys/6602ff445136470008bd095f |
Deploy Preview | https://deploy-preview-1693--stacks.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Looks fine in Stacks docs but I guess we can't test the additional popup core has when you click on the search bar until it's merged in. Maybe we don't need to?
@CGuindon I've tested Core by manually replacing the topbar styles (see below). It's a little bit of a pain to check this, but we can make sure it works well in Core once we cut a new Stacks Classic release and update Core with it.
@giamir I'm going to merge this so I can replace the hotfix I added to Core with a new Stacks Classic patch version. Feel free to review when you have a moment. Thanks in advance
Addresses https://meta.stackexchange.com/questions/398680/too-small-search-bar See also https://stackexchange.slack.com/archives/C27RWNQN9/p1711421438736069?thread_ts=1711408665.906589&cid=C27RWNQN9
Note: Core currently has a hotfix that should be removed once it consumes a Stacks Classic version that includes this fix.
The issue
This PR fixes responsive topbar styles, specifically styles on the searchbar. In Core, responsive topbar styles were rendering as:
Note the extra
html.html__responsive.html__unpinned-leftnav
. I believe this is related to the @force-selector code in the responsive less functions, but I haven't totally deciphered why the CSS renders differently in consumers. I'll make a ticket to understand and (possibly) refactor our responsive helpers so they're easier to use and understand.The fix
A stable solution seems to be to remove any nested selectors in the responsive functions, instead opting to include the responsive functions within the nested selectors themselves. I've tested this in Core and it resolves the issue.
FYI you should see no visible change in the Stacks docs.
To test
In Stacks
In Core
topbar.less
fileStackOverflow/node_modules/@stackoverflow/stacks/lib/components/topbar/topbar.less
with the copied codenpm run build
in theStackOverflow
directory@CGuindon for visibility.