-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separating anchored position and Overlay class (#2088)
- Loading branch information
Showing
6 changed files
with
36 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@primer/view-components": minor | ||
--- | ||
|
||
Separating `<anchored-position>` web component and the .Overlay class into separate markup. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
<%= show_button %> | ||
<%= render Primer::BaseComponent.new(**@system_arguments) do %> | ||
<%= header %> | ||
<% if content.present? %> | ||
<%= content %> | ||
<% else %> | ||
<%= body %> | ||
<%= footer %> | ||
<%= render Primer::BaseComponent.new(tag: :div, classes: @wrapper_classes) do %> | ||
<%= header %> | ||
<% if content.present? %> | ||
<%= content %> | ||
<% else %> | ||
<%= body %> | ||
<%= footer %> | ||
<% end %> | ||
<% end %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,30 @@ | ||
.Overlay[popover] { | ||
anchored-position[popover] { | ||
border-width: 0; | ||
padding: 0; | ||
position: absolute; | ||
min-width: 192px; | ||
inset: auto; | ||
overflow: visible; | ||
} | ||
|
||
.Overlay[popover]:not(.\:popover-open) { | ||
.Overlay { | ||
display: flex; | ||
} | ||
|
||
anchored-position[popover]:not(.\:popover-open) { | ||
display: none; | ||
} | ||
|
||
/* This reverts the declaration above for native popover, where `:popover-open` is supported */ | ||
@supports selector(:popover-open) { | ||
.Overlay[popover]:not(.\:popover-open) { | ||
anchored-position[popover]:not(.\:popover-open) { | ||
display: revert; | ||
} | ||
} | ||
|
||
/* This reverts the declaration above for native popover, where `:open` is supported (Chrome 113, Safari TP) */ | ||
@supports selector(:open) { | ||
.Overlay[popover]:not(.\:popover-open) { | ||
anchored-position[popover]:not(.\:popover-open) { | ||
display: revert; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters