aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components/Form
diff options
context:
space:
mode:
authorjackyzha0 <[email protected]>2021-03-06 09:44:00 -0800
committerjackyzha0 <[email protected]>2021-03-06 09:44:00 -0800
commitcf59188dff4526a358d0386f8113f542e24fffc2 (patch)
tree79eff89e90909c2391b0fa6eb7e81695d7c88413 /frontend/src/components/Form
parentbutton styling (diff)
downloadctrl-v-cf59188dff4526a358d0386f8113f542e24fffc2.tar.xz
ctrl-v-cf59188dff4526a358d0386f8113f542e24fffc2.zip
add more css mixins
Diffstat (limited to 'frontend/src/components/Form')
-rw-r--r--frontend/src/components/Form/Input.js2
-rw-r--r--frontend/src/components/Form/mixins.js10
2 files changed, 11 insertions, 1 deletions
diff --git a/frontend/src/components/Form/Input.js b/frontend/src/components/Form/Input.js
index e000cfb..7c9e413 100644
--- a/frontend/src/components/Form/Input.js
+++ b/frontend/src/components/Form/Input.js
@@ -1,5 +1,5 @@
import styled from 'styled-components'
-import {Border, DropShadow, InputLike, Rounded} from "./mixins";
+import {Border, DropShadow, InputLike, Rounded, Transition} from "./mixins";
export const Input = styled.input`
${Border}
diff --git a/frontend/src/components/Form/mixins.js b/frontend/src/components/Form/mixins.js
index 38ea394..64b7cc0 100644
--- a/frontend/src/components/Form/mixins.js
+++ b/frontend/src/components/Form/mixins.js
@@ -4,6 +4,15 @@ export const DropShadow = css`
box-shadow: 0 14px 28px rgba(27, 33, 48,0.06), 0 10px 10px rgba(27, 33, 48,0.02);
`
+export const Hover = css`
+ opacity: 0.5;
+ transition: all 0.5s cubic-bezier(.25,.8,.25,1);
+
+ &:focus, &:hover, &:focus span {
+ opacity: 1;
+ }
+`
+
export const Rounded = css`
border-radius: 3px;
`
@@ -13,6 +22,7 @@ export const Border = css`
`
export const InputLike = css`
+ ${Hover}
font-family: 'JetBrains Mono', monospace;
width: 100%;
font-size: 0.8em;