-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Base Styles: Extract long-content-fade to its own file so it can be i…
…mported and reused. (#46485) Co-authored-by: Daniel Bachhuber <daniel.bachhuber@automattic.com>
- Loading branch information
1 parent
cbacc8d
commit efab914
Showing
2 changed files
with
62 additions
and
63 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,61 @@ | ||
/** | ||
* Long content fade mixin | ||
* | ||
* Creates a fading overlay to signify that the content is longer | ||
* than the space allows. | ||
*/ | ||
|
||
@mixin long-content-fade($direction: right, $size: 20%, $color: #fff, $edge: 0, $z-index: false) { | ||
content: ""; | ||
display: block; | ||
position: absolute; | ||
-webkit-touch-callout: none; | ||
-webkit-user-select: none; | ||
-khtml-user-select: none; | ||
-moz-user-select: none; | ||
-ms-user-select: none; | ||
user-select: none; | ||
pointer-events: none; | ||
|
||
@if $z-index { | ||
z-index: $z-index; | ||
} | ||
|
||
@if $direction == "bottom" { | ||
background: linear-gradient(to top, transparent, $color 90%); | ||
left: $edge; | ||
right: $edge; | ||
top: $edge; | ||
bottom: calc(100% - $size); | ||
width: auto; | ||
} | ||
|
||
@if $direction == "top" { | ||
background: linear-gradient(to bottom, transparent, $color 90%); | ||
top: calc(100% - $size); | ||
left: $edge; | ||
right: $edge; | ||
bottom: $edge; | ||
width: auto; | ||
} | ||
|
||
@if $direction == "left" { | ||
background: linear-gradient(to left, transparent, $color 90%); | ||
top: $edge; | ||
left: $edge; | ||
bottom: $edge; | ||
right: auto; | ||
width: $size; | ||
height: auto; | ||
} | ||
|
||
@if $direction == "right" { | ||
background: linear-gradient(to right, transparent, $color 90%); | ||
top: $edge; | ||
bottom: $edge; | ||
right: $edge; | ||
left: auto; | ||
width: $size; | ||
height: auto; | ||
} | ||
} |
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
efab914
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.
Flaky tests detected.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.
🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/3750826649
📝 Reported issues:
Browse all
#45332 inspecs/editor/various/inserting-blocks.test.js
specs/editor/blocks/classic.test.js
specs/editor/various/block-editor-keyboard-shortcuts.test.js
specs/editor/various/multi-block-selection.test.js