-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Themes: Fix the archives block frontend/editor parity #30141
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,3 +81,34 @@ | |
.items-justified-space-between { | ||
justify-content: space-between; | ||
} | ||
|
||
.screen-reader-text { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @aristath, I think you propose to add the same styles on the frontend in one of your PRs. It raised the question of whether it should be added directly to WordPress core. So far it existed only in WP-Admin. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the skip link PR, theme authors can opt in to use a default style for the skip link, or they can use their own. The skip link is slightly different than screen-reader-text. Screen-reader-text can be, but is not always visible on focus, the skip link is always visible on focus. |
||
border: 0; | ||
clip: rect(1px, 1px, 1px, 1px); | ||
-webkit-clip-path: inset(50%); | ||
clip-path: inset(50%); | ||
height: 1px; | ||
margin: -1px; | ||
overflow: hidden; | ||
padding: 0; | ||
position: absolute; | ||
width: 1px; | ||
word-wrap: normal !important; | ||
} | ||
|
||
.screen-reader-text:focus { | ||
background-color: $gray-300; | ||
clip: auto !important; | ||
clip-path: none; | ||
color: #444; | ||
youknowriad marked this conversation as resolved.
Show resolved
Hide resolved
|
||
display: block; | ||
font-size: 1em; | ||
height: auto; | ||
left: 5px; | ||
line-height: normal; | ||
padding: 15px 23px 14px; | ||
youknowriad marked this conversation as resolved.
Show resolved
Hide resolved
|
||
text-decoration: none; | ||
top: 5px; | ||
width: auto; | ||
z-index: 100000; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This dependency causes the admin styles to be added within the iframe. Any way we can avoid that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is adding these styles on the front-end? Surely not
common.css
? Can we use the same stylesheet as the front-end?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason we added these dependencies here is because the "reset" style need to be loaded after "common" and "forms" otherwise you get this kind of issues #30141 (comment)
--
I'm not really sure how this relates to the iframe though because all these three stylesheets (reset, common and forms) are probably better off of the iframe (the reset style is only needed because of WP-Admin default styles).
I'm also not sure about your question about frontend, this is unrelated to frontend but in order for the editor to match frontend we need to "reset" some WP-Admin styles inside the canvas (in non-iframe mode) and that's what this reset style does.