Skip to content

Commit

Permalink
23.12.93: input type number hidden default browser arrows [WTEL-3902]
Browse files Browse the repository at this point in the history
  • Loading branch information
dlohvinov committed Dec 6, 2023
1 parent 2eef65d commit b208198
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@webitel/ui-sdk",
"version": "23.12.92",
"version": "23.12.93",
"private": false,
"scripts": {
"dev": "vite",
Expand All @@ -11,7 +11,7 @@
"prepare": "husky install",
"publish-lib": "npm run test:unit && npm run build && npm publish --access public",
"publish-lib:testless": "npm run build && npm publish --access public",
"docs:dev": "vitepress dev docs",
"docs:dev": "vitepress dev docs --port 8080",
"docs:build": "vitepress build docs",
"docs:preview": "vitepress preview docs"
},
Expand Down
14 changes: 14 additions & 0 deletions src/components/wt-input/wt-input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,20 @@ onMounted(() => {
border-radius: var(--border-radius);
background: transparent;
// disable arrows
/* Chrome, Safari, Edge, Opera */
&::-webkit-outer-spin-button,
&::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
// disable arrows
/* Firefox */
&[type=number] {
-moz-appearance: textfield;
}
.wt-input--invalid &,
.wt-input--invalid:hover & {
@include wt-placeholder('error');
Expand Down
14 changes: 14 additions & 0 deletions src/components/wt-time-input/wt-time-input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,20 @@ export default {
background: transparent;
transition: var(--transition);
// disable arrows
/* Chrome, Safari, Edge, Opera */
&::-webkit-outer-spin-button,
&::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
// disable arrows
/* Firefox */
&[type=number] {
-moz-appearance: textfield;
}
.wt-time-input--invalid &,
.wt-time-input--invalid:hover & {
@include wt-placeholder('error');
Expand Down
2 changes: 2 additions & 0 deletions src/playground.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<template>
<div class="playground">
<wt-select></wt-select>
<wt-pagination></wt-pagination>
<wt-input />
<wt-icon-btn
icon="edit"
Expand Down

0 comments on commit b208198

Please sign in to comment.