Skip to content

Commit

Permalink
port over imagedropdown css
Browse files Browse the repository at this point in the history
  • Loading branch information
riknoll committed Jan 23, 2024
1 parent 7dd783a commit 2af458a
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion newblocks/fields/field_imagedropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,32 @@ export class FieldImageDropdown extends Blockly.FieldDropdown implements FieldCu
this.borderRect_.setAttribute('fill', this.savedPrimary_);
}
};
}
}

Blockly.Css.register(`
.blocklyDropDownButton {
display: inline-block;
float: left;
padding: 0;
margin: 4px;
border-radius: 4px;
outline: none;
border: 1px solid;
transition: box-shadow .1s;
cursor: pointer;
}
.blocklyDropDownButtonHover {
box-shadow: 0px 0px 0px 4px rgba(255, 255, 255, 0.2);
}
.blocklyDropDownButton:active {
box-shadow: 0px 0px 0px 6px rgba(255, 255, 255, 0.2);
}
.blocklyDropDownButton > img {
width: 80%;
height: 80%;
margin-top: 5%
}
`)

0 comments on commit 2af458a

Please sign in to comment.