Closed bradleycamacho closed 1 month ago
The changes made involve the styles/global.css
file, specifically the div.custom-callouts
CSS class. Key modifications include changing the position
from fixed
to static
, adjusting the top
property from 65px
to 45px
, and setting both padding-left
and padding-right
to 0
. The width
property has been added and set to 100%
, while the z-index
has been removed. Other properties such as background color, border, and border-radius remain unchanged.
File | Change Summary |
---|---|
styles/global.css | Modified div.custom-callouts : changed position to static , adjusted top to 45px , set padding-left and padding-right to 0 , added width set to 100% , removed z-index . |
div.custom-callouts
CSS class, specifically changing the position
property, which is directly related to the changes made in the main PR that also involves modifications to the same CSS class.styles/global.css (3)
Line range hint `72-76`: **Consider adjusting mobile styles for consistency.** The media query for screens with max-width 767px sets a different `top` value for `div.custom-callouts`. Given the changes made to the main class, consider reviewing and potentially adjusting this mobile-specific style: ```css @media only screen and (max-width: 767px) { div.custom-callouts { top: 105px; } } ``` With the main class now using `position: static`, the `top` property in this media query may no longer have the intended effect. You might need to use a different approach to adjust the banner's position on mobile devices, such as using margin or padding. To ensure the mobile styles are appropriate, please test the layout on various mobile device sizes. You can use browser developer tools to simulate different screen sizes and check the banner's appearance and positioning. --- Line range hint `57-76`: **Summary: Changes align with objectives but require thorough testing.** The modifications to `div.custom-callouts` successfully change the banner from fixed to static positioning, addressing the readability issues mentioned in the PR objectives. However, these changes may have implications for the layout and appearance across different devices and screen sizes. Recommendations: 1. Test the banner's appearance and positioning across various devices and screen sizes, particularly on mobile. 2. Consider adding some horizontal padding to the banner content if it appears too close to the edges. 3. Review and adjust the mobile-specific styles in the media query to ensure they're still relevant and effective with the new static positioning. 4. Verify that the removal of z-index doesn't cause any stacking issues with other page elements. These changes are a step in the right direction for improving the documentation's usability, but careful testing and potential refinements will ensure the best possible user experience across all devices. --- `57-61`: **Changes align with PR objectives but may have layout implications.** The modifications to the `div.custom-callouts` class align with the PR objectives of changing from fixed to static positioning for banners. However, there are a few points to consider: 1. The change from `position: fixed` to `static` will indeed prevent the banner from sticking to the viewport, which addresses the readability issues mentioned in the PR objectives. 2. The `top` value has been reduced from 65px to 45px. This might affect the vertical placement of the banner. Ensure this doesn't cause any unintended overlap with other elements, especially on smaller screens. 3. Setting `padding-left` and `padding-right` to 0 removes horizontal padding. This could cause the content to touch the edges of the banner, potentially affecting readability. Consider adding some horizontal padding if needed. 4. The addition of `width: 100%` ensures the banner spans the full width of its container, which is good for consistency. 5. The `z-index` property has been removed. While this is generally fine with static positioning, be aware that it might affect how the banner stacks with other elements if there are any overlapping scenarios. To ensure these changes don't negatively impact the layout, especially on mobile devices, please run the following verification:
Name | Link |
---|---|
Latest commit | 78356117990a3dc9ebcea710e027f83193dbb6c9 |
Latest deploy log | https://app.netlify.com/sites/docs-optimism/deploys/66f35afa25369b0008e358a0 |
Deploy Preview | https://deploy-preview-926--docs-optimism.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.
Tagging @brokewhale to make sure I did it right this time :)
We were a bit too quick on the draw for #925. This uses static instead of sticky/fixed to make sure the content in banners looks correct in the context of the rest of the doc.
Pasting the description from the other PR: