Skip to content

Commit

Permalink
Add button-bubble from each corner
Browse files Browse the repository at this point in the history
  • Loading branch information
jolaleye committed Apr 27, 2019
1 parent 0b7d507 commit 171b0c3
Show file tree
Hide file tree
Showing 4 changed files with 172 additions and 0 deletions.
43 changes: 43 additions & 0 deletions effects/button-bubble-bl.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<template>
<button>Button</button>
</template>

<style scoped>
button {
z-index: 1;
position: relative;
font-size: inherit;
font-family: inherit;
color: white;
padding: 0.5em 1em;
outline: none;
border: none;
background-color: hsl(246, 45%, 15%);
overflow: hidden;
transition: color 0.4s ease-in-out;
}
button::before {
content: '';
z-index: -1;
position: absolute;
top: 100%;
right: 100%;
width: 1em;
height: 1em;
border-radius: 50%;
background-color: #3cefff;
transform-origin: center;
transform: translate(50%, -50%) scale(0);
transition: transform 0.45s ease-in-out;
}
button:hover {
cursor: pointer;
color: #161616;
}
button:hover::before {
transform: translate(50%, -50%) scale(15);
}
</style>
43 changes: 43 additions & 0 deletions effects/button-bubble-br.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<template>
<button>Button</button>
</template>

<style scoped>
button {
z-index: 1;
position: relative;
font-size: inherit;
font-family: inherit;
color: white;
padding: 0.5em 1em;
outline: none;
border: none;
background-color: hsl(246, 45%, 15%);
overflow: hidden;
transition: color 0.4s ease-in-out;
}
button::before {
content: '';
z-index: -1;
position: absolute;
top: 100%;
left: 100%;
width: 1em;
height: 1em;
border-radius: 50%;
background-color: #3cefff;
transform-origin: center;
transform: translate(-50%, -50%) scale(0);
transition: transform 0.45s ease-in-out;
}
button:hover {
cursor: pointer;
color: #161616;
}
button:hover::before {
transform: translate(-50%, -50%) scale(15);
}
</style>
43 changes: 43 additions & 0 deletions effects/button-bubble-tl.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<template>
<button>Button</button>
</template>

<style scoped>
button {
z-index: 1;
position: relative;
font-size: inherit;
font-family: inherit;
color: white;
padding: 0.5em 1em;
outline: none;
border: none;
background-color: hsl(246, 45%, 15%);
overflow: hidden;
transition: color 0.4s ease-in-out;
}
button::before {
content: '';
z-index: -1;
position: absolute;
bottom: 100%;
right: 100%;
width: 1em;
height: 1em;
border-radius: 50%;
background-color: #3cefff;
transform-origin: center;
transform: translate(50%, 50%) scale(0);
transition: transform 0.45s ease-in-out;
}
button:hover {
cursor: pointer;
color: #161616;
}
button:hover::before {
transform: translate(50%, 50%) scale(15);
}
</style>
43 changes: 43 additions & 0 deletions effects/button-bubble-tr.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<template>
<button>Button</button>
</template>

<style scoped>
button {
z-index: 1;
position: relative;
font-size: inherit;
font-family: inherit;
color: white;
padding: 0.5em 1em;
outline: none;
border: none;
background-color: hsl(246, 45%, 15%);
overflow: hidden;
transition: color 0.4s ease-in-out;
}
button::before {
content: '';
z-index: -1;
position: absolute;
bottom: 100%;
left: 100%;
width: 1em;
height: 1em;
border-radius: 50%;
background-color: #3cefff;
transform-origin: center;
transform: translate(-50%, 50%) scale(0);
transition: transform 0.45s ease-in-out;
}
button:hover {
cursor: pointer;
color: #161616;
}
button:hover::before {
transform: translate(-50%, 50%) scale(15);
}
</style>

0 comments on commit 171b0c3

Please sign in to comment.