You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to justify my button content to the left, but the added class justify-left is put on the <vscode-button> element, which has no effect. I wonder how I can add the class to the underlying <button> element in the shadow root.
Expected behavior
Allow passing class names or inline styles to style the shadow elements.
Current behavior
Cannot style the button because the class names and inline styles are applied to the wrapper elements.
Use case
I'm trying to justify my button content to the left.
Screenshots/references
It would work if the class is passed to the actual <button> element instead:
The text was updated successfully, but these errors were encountered:
Hey @teddyfullstack! It's not well documented (apologies) but the part attribute/psuedo-element selector can be used to access/style elements within the shadow root.
You can read more about ::part() on MDN, but here's a basic example to give you an idea:
Feature request
I want to justify my button content to the left, but the added class
justify-left
is put on the<vscode-button>
element, which has no effect. I wonder how I can add the class to the underlying<button>
element in the shadow root.Expected behavior
Allow passing class names or inline styles to style the shadow elements.
Current behavior
Cannot style the button because the class names and inline styles are applied to the wrapper elements.
Use case
I'm trying to justify my button content to the left.
Screenshots/references
It would work if the class is passed to the actual
<button>
element instead:The text was updated successfully, but these errors were encountered: