Hi folks @moderators,
I risk posting this in the BUG REPORTS category, as it might very well be that I missed something.
Here goes: @media (min-width:992px) seems to be ignored at stage width of 992px, but is effective at 994px.
It might look like me being picky, but as the LG Breakpoint button is set to 992px, it becomes misleading when designing a gallery (among other things).
Here are the steps to reproduce what I see as a bug, using Bootstrap Studio 6.0.1:
create a blank project using Bootstrap 5.1
insert a container
in the Appearance pane, confirm that the container’s width matches the first max-width media query
with the container selected, in the Style pane, we see a series of media queries, for 1400, 1200, 992, 768 and 576 min-width. Only the first one is active for now.
click the LG Breakpoint button to set the stage to 992px, the first media query is now @media (min-width:768px)
manually enlarge the stage to 994px and the media query @media (min-width:992px) comes back
It looks to me there is a (tiny but annoying) offset around that 992 breakpoint.
For the giggles, I just redownloded Bootstrap Studio 5.9.3 to try this, aaaand… this “bug” is not there!
Agreed. But somehow, preview (and export) doesn’t behave exactly the same way with Safari or Firefox than Chromium-based browsers. That’s what made me discover that bug (plus the fact I designed a gallery with UI scaled at 110%).
@martin I can confirm the bug does occur with UI scaled at the following values:
And while we’re at it, for sake of completeness, the bug also exists in BSS 6.0.0 and 5.9.3.
I didn’t notice the UI wasn’t at the same scale when I reported yesterday.
Unfortunately there is not much we can do to fix this. Bootstrap Studio is built using Electron, which uses Chromium. So UI scaling will always lead to imprecise breakpoint calculations. Resizing the stage by hand instead of clicking the breakpoint buttons is the easiest workaround to make sure that the media queries apply.
I get that. So far, everything seems fine with UI scaled at 100%. So with manual resizing, that makes two workarounds.
That said, should we give up completely on UI scaling?
It’s a nice feature, but given it is kind of broken…
Or should we make all users aware of that limitation? Perhaps a warning that pops-up when one scale the UI for the first time.
I discovered this quirk quite some time ago. If the UI is set at anything other than 100%, breakpoints in the BSS preview window do not “break” at the correct pixel size.