@@ -206,21 +206,13 @@ class ImageCropElement extends HTMLElement {
206206 const shadowRoot = this . attachShadow ( { mode : 'open' } )
207207 shadowRoot . innerHTML = `
208208<style>
209- :host {
210- touch-action: none;
211- display: block;
212- }
209+ :host { touch-action: none; display: block; }
213210 :host(.nesw) { cursor: nesw-resize; }
214211 :host(.nwse) { cursor: nwse-resize; }
215- :host(.nesw) .crop-box,
216- :host(.nwse) .crop-box {
217- cursor: inherit;
218- }
212+ :host(.nesw) .crop-box, :host(.nwse) .crop-box { cursor: inherit; }
219213 :host([loaded]) .crop-image { display: block; }
220- :host([loaded]) ::slotted([data-loading-slot]),
221- .crop-image {
222- display: none;
223- }
214+ :host([loaded]) ::slotted([data-loading-slot]), .crop-image { display: none; }
215+
224216 .crop-wrapper {
225217 position: relative;
226218 font-size: 0;
@@ -237,12 +229,21 @@ class ImageCropElement extends HTMLElement {
237229 width: 100%;
238230 height: 100%;
239231 }
232+
233+ :host([rounded]) .crop-box {
234+ border-radius: 50%;
235+ box-shadow: 0 0 0 500px rgba(0, 0, 0, 0.3);
236+ }
240237 .crop-box {
241238 position: absolute;
242239 border: 1px dashed #fff;
243240 box-sizing: border-box;
244241 cursor: move;
245242 }
243+
244+ :host([rounded]) .crop-outline {
245+ outline: none;
246+ }
246247 .crop-outline {
247248 position: absolute;
248249 top: 0;
@@ -251,7 +252,9 @@ class ImageCropElement extends HTMLElement {
251252 right: 0;
252253 outline: 4000px solid rgba(0, 0, 0, .3);
253254 }
255+
254256 .handle { position: absolute; }
257+ :host([rounded]) .handle::before { border-radius: 50%; }
255258 .handle:before {
256259 position: absolute;
257260 display: block;
0 commit comments