-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
File block: Try refreshing styles #39118
Changes from 3 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 |
---|---|---|
|
@@ -5,12 +5,6 @@ | |
height: auto; | ||
} | ||
|
||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: space-between; | ||
align-items: center; | ||
margin-bottom: 0; | ||
|
||
.components-resizable-box__container { | ||
margin-bottom: 1em; | ||
} | ||
|
@@ -29,16 +23,27 @@ | |
left: 0; | ||
} | ||
|
||
// This is an extra container present only in the editor view. | ||
.wp-block-file__content-wrapper { | ||
flex-grow: 1; | ||
display: flex; | ||
flex: 1; | ||
align-items: center; | ||
} | ||
|
||
// This is the editable filename on the left. | ||
// Make sure it matches the styling on the frontend. | ||
// Except for flex-grow, it is useful to have an easily selectable block. | ||
a { | ||
min-width: 1em; | ||
min-width: 2em !important; | ||
} | ||
|
||
// This element maps to the Download button link on the right. | ||
.wp-block-file__button-richtext-wrapper { | ||
display: inline-block; | ||
margin-left: 0.75em; | ||
margin-left: auto; | ||
} | ||
|
||
// The file block already has a border, so don't show the extra border of the placceholder. | ||
.components-placeholder.components-placeholder { | ||
box-shadow: none; | ||
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. I suppose if we do add border support, you could set the border to zero which might be weird in the placeholder state 🤔 Then again, it seems like the placeholder state itself could do with a great deal of iteration to be more minimal — almost just a small dashed-line dropzone of the same size as the resulting block? Probably best to explore separately. |
||
} | ||
} |
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.
Do we still need to have different markup in the editor?
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.
Probably not. The block feels somewhat oldish. Feel free to commit to the PR if you like!
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.
Might be better as a follow up!