Skip to content
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

Fix leaking CSS styling #11959

Merged
merged 4 commits into from
Apr 30, 2024
Merged

Fix leaking CSS styling #11959

merged 4 commits into from
Apr 30, 2024

Conversation

ggetz
Copy link
Contributor

@ggetz ggetz commented Apr 26, 2024

Description

We ID'd some cases where the styling from packages/widgets/Source/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css was affecting other styling in the page, particularly ul, input, and .active items.

This adds a top-level class for the wrapper element and ensures all styling is contained to the wrapper.

Issue number and link

N/A

Testing plan

  1. Check on previous appearance of the widget in https://sandcastle.cesium.com/?src=I3S%20Building%20Scene%20Layer.html. Make sure you select "Full Model" from the dropdown to see the whole panel contents.
  2. Ensure the updated version is styled the same
  3. Ensure other ul, input, and .active items in a page are not affected.

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change
  • I have added or updated unit tests to ensure consistent code coverage
  • I have update the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

@ggetz
Copy link
Contributor Author

ggetz commented Apr 26, 2024

@jjspace Could you please take a look?

Copy link

Thank you for the pull request, @ggetz!

✅ We can confirm we have a CLA on file for you.

Copy link
Contributor

@jjspace jjspace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, the element looks the same as before and the code change makes sense. Just had one quick question/suggestion. O

Comment on lines +1 to 7
.cesium-viewer-i3s-explorer ul {
list-style-type: none;
}

.layersList {
.cesium-viewer-i3s-explorer .layersList {
padding: 0;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be made a bit cleaner using the new ability for nested CSS Selectors.

.cesium-viewer-i3s-explorer {
  ul {
    list-style-type: none;
  }

  .layersList {
    padding: 0;
  }
  /* ... */
}

However once again brings up the question of what browsers/environments do we target support for? It was only generally available in the majority of browsers last December as seen on caniuse

Not a reason to hold up this PR but wanted to bring it up

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jjspace, I didn't know about these! Let's hold off for now given the amount of time it's been out.

@jjspace jjspace merged commit 1207d26 into main Apr 30, 2024
9 checks passed
@jjspace jjspace deleted the i3s-css branch April 30, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants