From 051fdbbc602f10f0780226ba9a23a6775ab5baef Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Tue, 7 Feb 2023 10:20:43 -0500 Subject: [PATCH] Fix snippet hover highlight not full button width --- client/homebrew/editor/snippetbar/snippetbar.less | 2 +- themes/V3/Blank/snippets/imageMask.gen.js | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/client/homebrew/editor/snippetbar/snippetbar.less b/client/homebrew/editor/snippetbar/snippetbar.less index 57f868899..9c6bf3f08 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.less +++ b/client/homebrew/editor/snippetbar/snippetbar.less @@ -97,7 +97,7 @@ background-color : #ddd; .snippet{ .animate(background-color); - width : max-content; + min-width : max-content; padding : 5px; cursor : pointer; font-size : 10px; diff --git a/themes/V3/Blank/snippets/imageMask.gen.js b/themes/V3/Blank/snippets/imageMask.gen.js index a583e0ab8..144239896 100644 --- a/themes/V3/Blank/snippets/imageMask.gen.js +++ b/themes/V3/Blank/snippets/imageMask.gen.js @@ -11,10 +11,12 @@ module.exports = { Use --rotation to set rotation angle in degrees. -->\n\n`; }, - corner : ()=>{ + corner : (y = 'top', x = 'left')=>{ + const offsetX = (x == 'left' ? '-50%' : '50%'); + const offsetY = (y == 'top' ? '-50%' : '50%'); return dedent` - {{imageMaskCorner${_.random(1, 8)},--offsetX:0%,offsetY:0%,--rotation:0 - ![](https://i.imgur.com/1w5khYt.png){height:100%} + {{imageMaskCorner${_.random(1, 8)},--offsetX:${offsetX},--offsetY:${offsetY},--rotation:0 + ![](https://i.imgur.com/GZfjDWV.png){height:100%} }}