I'm trying to put hexagons made with CSS around a circle. I already got the circle and the hexagons (they are stocked on top of each other), I just can't get the code of organizing them to work (it's on the CSS part of the code). http://imgur.com/Sv82DB0 (I'm aiming this effect).
$darkPrimary: #ffa000;
$primaryYellow: #ffc107;
$lightPrimaryColor: #ffecb3;
$darkGray: #212121;
$redOrange: #ff5722;
$lightGray: #757575;
$dividerColor: #bdbdbd;
// $rot // rotation for the current item
$nb-items: 4;
$angle: (360deg / $nb-items); // angle between two items
// $nb-items // number of item
$rot: 0;
$circle-size: 21.875em;
#mixin placingElements () {
#for $i from 1 through $nb-items {
.shapes__circle:nth-child(#{$i}) {
// Rotate the axis
rotate: ($rot * 1);
// Move the item from the center
translate: $circle-size / 2;
// Rotate the item back to its default position
rotate: ($rot * -1);
}
$rot: $rot+$angle;
}
//Increments the '$rot' variable for the next item
}
.shapes {
position: absolute;
display: block;
margin-left: 30px;
&__circle {
#include placingElements();
position: relative;
top: 60px;
border: 19px solid $primaryYellow;
border-radius: 50%;
box-shadow: 0 0 1px 0 rgb(255, 255, 255);
width: 350px;
height: 350px;
z-index: 1;
}
&__hexagon {
width: 120px;
height: 80px;
background: $redOrange;
position: absolute;
top: -50px;
left: 90px;
margin: 10px auto;
z-index: 2;
&::before {
content: "";
width: 0;
height: 0;
position: absolute;
top: -45px;
left: 0;
border-left: 60px solid transparent;
border-right: 60px solid transparent;
border-bottom: 45px solid $redOrange;
}
&::after {
content: "";
width: 0;
height: 0;
position: absolute;
bottom: -45px;
left: 0;
border-left: 60px solid transparent;
border-right: 60px solid transparent;
border-top: 45px solid $redOrange;
}
&--inside-img {
position: absolute;
height: 55px;
width: 55px;
left: 25%;
top: 32%;
}
&--inside-text {
position: absolute;
top: -14%;
left: 5%;
font-family: 'Overpass Mono', monospace;
font-size: 1rem;
color: $darkGray;
font-weight: 600;
}
}
}
<div class="shapes__circle">
<div class="shapes shapes__hexagon">
<p class="shapes__hexagon--inside-text">Ferramentas</p>
<img class="shapes__hexagon--inside-img" src="./assets/img/ferramentas.png" alt="">
</div>
<div class="shapes shapes__hexagon">
<p class="shapes__hexagon--inside-text">Ferramentas</p>
<img class="shapes__hexagon--inside-img" src="./assets/img/ferramentas.png" alt="">
</div>
<div class="shapes shapes__hexagon">
<p class="shapes__hexagon--inside-text">Ferramentas</p>
<img class="shapes__hexagon--inside-img" src="./assets/img/ferramentas.png" alt="">
</div>
<div class="shapes shapes__hexagon">
<p class="shapes__hexagon--inside-text">Ferramentas</p>
<img class="shapes__hexagon--inside-img" src="./assets/img/ferramentas.png" alt="">
</div>
</div>
<!-- __section-img--circle -->
Related
I have problem with some parts of my spinning-wheel component in built-mode when I deploy my application to server.I have no issue if I run the code locally with "npm run dev", but the problems come when run the code with "npm run build" and "npm start".
Here is the snapshots of development mode (picture 1) and built mode (picture 2):
And this is the scss file I used :
.board-arisan-container {
--wheel-size: 300px;
--wheel-slice-spacing: 50px;
--wheel-border-size: 5px;
--wheel-color: #ffad00;
--neutral-color: #ffffff;
--PI: 3.60;
--nb-item: 0;
--item-nb: 0;
--selected-item: 0;
--nb-turn: 5;
--spinning-duration: 4s;
--reset-duration: 0.25s;
transform: rotate(-90deg);
.wheel-container {
display: block;
position: relative;
box-sizing: content-box;
width: calc(var(--wheel-size) + 2 * var(--wheel-border-size));
height: calc(var(--wheel-size) + 2 * var(--wheel-border-size));
padding: 3px;
margin: auto;
background-color: var(--neutral-color);
border: solid var(--wheel-color) 10px;
border-radius: 50%;
user-select: none;
}
.wheel-container::before,
.wheel-container::after {
content: "";
display: block;
position: absolute;
height: 0;
width: 0;
top: 50%;
transform: translateY(-50%);
z-index: 2;
border: solid transparent 20px;
border-left-width: 0;
}
.wheel-container::before {
right: 0px;
border-right-color: var(--wheel-color);
}
.wheel-container::after {
right: -5px;
border-right-color: var(--neutral-color);
}
/* Roue */
.wheel {
display: block;
position: relative;
box-sizing: content-box;
margin: auto;
width: var(--wheel-size);
height: var(--wheel-size);
overflow: hidden;
border-radius: 50%;
border: solid var(--wheel-color) var(--wheel-border-size);
background-color: var(--wheel-color);
transition: transform var(--reset-duration);
transform: rotate(0deg);
cursor: pointer;
}
.wheel.spinning {
transition: transform var(--spinning-duration);
transform: rotate(calc(var(--nb-turn) * 360deg + (-360deg * var(--selected-item) / var(--nb-item, 1))));
}
.wheel::after {}
.wheel-item {
display: block;
position: absolute;
box-sizing: border-box;
/* position de l'item */
top: 50%;
left: 50%;
width: 50%;
transform-origin: center left;
transform: translateY(-50%) rotate(calc(var(--item-nb) * (360deg / var(--nb-item, 1))));
/* texte */
color: var(--neutral-color);
text-align: right;
padding: 0 50px 0 50px;
font-family: var(--wheel-font);
}
/* Background de l'élément = triangle rose plus clair */
.wheel-item:before {
content: " ";
display: block;
position: absolute;
box-sizing: border-box;
z-index: -1;
width: 0;
height: 0;
top: 50%;
left: 50%;
transform: translate(-47%, -50%);
padding-left: 0px;
--slice-max-width: calc(var(--PI) * var(--wheel-size) + var(--wheel-size) / 2);
--slice-width: calc((var(--slice-max-width) / var(--nb-item)) - var(--wheel-slice-spacing));
border: solid transparent calc(var(--slice-width) / 2);
border-left: solid transparent 0;
border-right: solid var(--neutral-color) calc(var(--wheel-size) / 2);
}
}
here is the the component code :
...
const wheelVars = {
'--nb-item': props.items.length,
'--selected-item': selectedItem,
}
const spinning = selectedItem !== null ? 'spinning' : '';
return( <div className="board-arisan-container">
<div className="wheel-container">
<div className={`wheel ${spinning}`} style={wheelVars} onClick={() => clearSelectedItem()}>
{props.items.map((item, index) => (
<div className="wheel-item" key={index} style={{
'--item-nb': index,
color: '#ffad00',
fontSize: 30,
fontWeight: 'bolder',
}}>
<span>{item}</span>
</div>
))}
</div>
</div>
</div>)
Thanks!
I Need Help.
I want to create a hero-image, but I'm having trouble positioning the text.
I want it to look like this:
enter image description here
When I do it my way, then I have a problem with RWD positioning later.
Maybe it is possible to do it somehow simpler?
<header>
<div class="hero-img">
<div class="hero-shadow"></div>
<div class="hero-text">
<h1>Zięba</h1>
<p>gallery</p>
</div>
<i class="fas fa-chevron-down"></i>
</header>
header {
.hero-img {
position: relative;
height: 100vh;
width: 100vw;
background-image: url('../img/Kapiaca-sie-small.jpg');
background-position: center;
background-size: cover;
background-attachment: fixed;
z-index: -2;
overflow: hidden;
.fa-chevron-down {
position: absolute;
left: 50%;
transform: translateX(-50%);
top: 95%;
color: $white-color;
font-size: 35px;
}
}
.hero-text {
position: absolute;
transform: translate(1430px, -50px);
height: 100%;
z-index: 5;
h1 {
color: $black-color;
font-size: 30rem;
font-family: 'Disclaimer', sans-serif;
}
h1::before {
content: 'Sławomir';
position: absolute;
display: inline-block;
transform: rotate(270deg);
top: 312px;
right: 180px;
font-size: 5rem;
font-family: 'Roboto', sans-serif;
color: $green-color;
}
p { position: absolute;
top: 540px;
right: 10px;
text-transform: uppercase;
color: $brown-color;
font-size: 1.6rem;
}
}
I am sending link to CodePen:https://codepen.io/Ewelaa/pen/MWoVwvY
header .hero-text {
position: absolute;
right:40px;
height: 100%;
z-index: 5;
}
Just use Right Property to fix position.
Is it possible to make this 2 circles always on the right and left of the bottom of the image? They need to be always one on the bottom left, the second on the bottom right of an image- when I resize the image. (they should always stick to the bottom corners of an image) How to position them like that?
enter code here
Codepen:
https://codepen.io/anami90/pen/KeEqRw?editors=1100
according to your quesrion the circles should appear on the outer column isnot it?
hope this helps:
div {
height: 100vh;
}
.col-3 {
background: lightgreen;
}
.col-6 {
background: pink;
padding: 0;
display: flex;
align-items: center;
position: relative;
}
.circle-left {
display: inline-block;
width: 50px;
height: 50px;
border-radius: 50%;
background-color: yellow;
position: absolute;
left: 0;
bottom: 0;
}
.circle-right {
display: inline-block;
width: 50px;
height: 50px;
border-radius: 50%;
background-color: red;
position: absolute;
right: 0;
bottom: 0;
}
img {
width: 100%;
height: auto;
vertical-align: middle;
}
<div class="row">
<div class="col-3">col-3</div>
<div class="circle-left"></div>
<div class="col-6">
<img src="https://www.w3schools.com/w3css/img_lights.jpg"/>
</div>
<div class="col-3">col-3</div>
<div class="circle-right"></div>
</div>
https://codepen.io/anon/pen/zabLoq?editors=1100
I would like to position this 2 circles as it is on this picture below:
enter image description here
How to use images instead of text labels?
I need the menu to slide down when the .logo (bird) image button is clicked
How can I link text label with a logo image on the menu bar?
PS: the menu slides down when the .logo (bird) is clicked BUT there are two birds, I need the menu to slide down when the bird image sitting on the menu is clicked, AND yes I need only one bird image
/* ------------------------------------------ */
/* BASIC SETUP */
/* ------------------------------------------ */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.page-wrap {
width: 1216px;
margin: 0 auto;
}
.row-basic {
max-width: 1216px;
}
html,
body {
text-align:justify
color: #fff;
font-size: 19px;
text-rendering: optimizeLegibility;
background: #333;
background-position: center;
height: 100vh;
background-attachment: fixed;
}
/* ------------------------------------------ */
/* HEADER */
/* ------------------------------------------ */
header {
background-color: rgba(246, 149, 149, 0.06);
height: 81px;
width: auto;
padding-top: 24px;
margin-top: 26px;
margin-bottom: 0px;
display:flex;
justify-content: space-between;
}
/* ----- NAVIGATION -----*/
nav {
display:flex;
align-items: center;
}
nav ul {
display:flex;
}
.user-tools {
display:flex;
align-items: center;
}
.user-tools :focus {
outline:none;
}
/* ----- LOGO -----*/
.logo {
position: relative;
cursor: pointer;
height: 68px;
width: auto;
margin-right: 21px;
margin-left: 31px;
z-index: 1;
}
/* ----- MENU BUTTON -----*/
.mobile-nav-toggle {
height: 50px;
width: 35px;
margin-right: 31px;
display: flex;
align-items: center;
cursor: pointer;
}
.mobile-nav-toggle span,
.mobile-nav-toggle span::before,
.mobile-nav-toggle span::after {
border-radius: 2px;
content: "";
display: block;
height: 6px;
width: 100%;
background: #fff;
position: relative;
}
.mobile-nav-toggle span::before {
top: 11px;
}
.mobile-nav-toggle span::after {
bottom: 17px;
}
/* ------------------------------------------ */
/* PAGE CONTENT TOP BAR */
/* ------------------------------------------ */
.box1 {
height: 26px;
width: 300px;
background: #8242b1;
}
.box2 {
height: 26px;
width: 300px;
background: #b14242;
}
.box3 {
height: 26px;
width: 300px;
background: #424bb1;
}
.page-content {
display:flex;
justify-content: center;
transition: all 0.3s ease-in-out 0s;
position:relative;
margin-top: -260px;
z-index: 0; }
.toggle {
transition: all 0.3s ease-in-out 0s;
text-decoration: none;
font-size: 30px;
color: #eaeaea;
position:relative;
top: -225px;
left: 20px;
z-index: 1; }
.toggle:hover {
color:#cccccc; }
.topbar {
display:flex;
justify-content: center;
align-items: center;
transition: all 0.3s ease-in-out 0s;
position: relative;
top: -220px;
bottom: 0px;
left: 0px;
height: 220px;
width: auto;
padding: 30px;
background: #333;
z-index: 1; }
.topbar li {
display:flex;
justify-content: center;
list-style: none;
color: rgba(255, 255, 255,0.8);
font-size: 16px;
margin-bottom: 16px;
cursor: pointer; }
.topbar li:hover {
color: rgba(255, 255, 255,1); }
#topbartoggler {
display: none; }
#topbartoggler:checked + .page-wrap .topbar {
top: -4px; }
#topbartoggler:checked + .page-wrap .toggle {
top: -5px; }
#topbartoggler:checked + .page-wrap .page-content {
padding-top: 220px; }
<body>
<input type="checkbox" id="topbartoggler" name="" value="">
<div class="page-wrap">
<div class="topbar">
<ul>
<li>Home</li>
<li>Projects</li>
<li>Clients</li>
<li>Blog</li>
<li>Contact</li>
</ul>
</div>
<label for="topbartoggler" class="toggle"><img src="http://bower.io/img/bower-logo.png" alt="logo" class="logo"></label>
<div class="page-content">
<div class="box1"></div>
<div class="box2"></div>
<div class="box3"></div>
</div>
<header class="row-basic">
<nav>
<img src="http://bower.io/img/bower-logo.png" alt="logo" class="logo">
</nav>
<div class="user-tools">
<div class="toggle"></div>
<div class="mobile-nav-toggle">
<span></span>
</div>
</div>
</header>
</div>
</body>
OK So I have found out all I needed to do was to replace
<img src="http://bower.io/img/bower-logo.png" alt="logo" class="logo">
with
<label for="topbartoggler" class="toggle"><img src="http://bower.io/img/bower-logo.png" alt="logo" class="logo"></label>
JSFiddle https://jsfiddle.net/heumnzLe/4/
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.page-wrap {
width: 1216px;
margin: 0 auto;
}
.row-basic {
max-width: 1216px;
}
html,
body {
text-align:justify
color: #fff;
font-size: 19px;
text-rendering: optimizeLegibility;
background: #333;
background-position: center;
height: 100vh;
background-attachment: fixed;
}
header {
background-color: rgba(246, 149, 149, 0.06);
height: 81px;
width: auto;
padding-top: 24px;
margin-top: 26px;
margin-bottom: 0px;
display:flex;
justify-content: space-between;
}
nav {
display:flex;
align-items: center;
}
nav ul {
display:flex;
}
.user-tools {
display:flex;
align-items: center;
}
.user-tools :focus {
outline:none;
}
.logo {
position: relative;
cursor: pointer;
height: 68px;
width: auto;
margin-right: 21px;
margin-left: 31px;
z-index: 1;
}
.mobile-nav-toggle {
height: 50px;
width: 35px;
margin-right: 31px;
display: flex;
align-items: center;
cursor: pointer;
}
.mobile-nav-toggle span,
.mobile-nav-toggle span::before,
.mobile-nav-toggle span::after {
border-radius: 2px;
content: "";
display: block;
height: 6px;
width: 100%;
background: #fff;
position: relative;
}
.mobile-nav-toggle span::before {
top: 11px;
}
.mobile-nav-toggle span::after {
bottom: 17px;
}
.box1 {
height: 26px;
width: 300px;
background: #8242b1;
}
.box2 {
height: 26px;
width: 300px;
background: #b14242;
}
.box3 {
height: 26px;
width: 300px;
background: #424bb1;
}
.page-content {
display:flex;
justify-content: center;
transition: all 0.3s ease-in-out 0s;
position:relative;
margin-top: -260px;
z-index: 0; }
.toggle {
transition: all 0.3s ease-in-out 0s;
text-decoration: none;
font-size: 30px;
color: #eaeaea;
position:relative;
top: -225px;
left: 20px;
z-index: 1; }
.toggle:hover {
color:#cccccc; }
.topbar {
display:flex;
justify-content: center;
align-items: center;
transition: all 0.3s ease-in-out 0s;
position: relative;
top: -220px;
bottom: 0px;
left: 0px;
height: 220px;
width: auto;
padding: 30px;
background: #333;
z-index: 1; }
.topbar li {
display:flex;
justify-content: center;
list-style: none;
color: rgba(255, 255, 255,0.8);
font-size: 16px;
margin-bottom: 16px;
cursor: pointer; }
.topbar li:hover {
color: rgba(255, 255, 255,1); }
#topbartoggler {
display: none; }
#topbartoggler:checked + .page-wrap .topbar {
top: -4px; }
#topbartoggler:checked + .page-wrap .toggle {
top: -5px; }
#topbartoggler:checked + .page-wrap .page-content {
padding-top: 220px; }
<body>
<input type="checkbox" id="topbartoggler" name="" value="">
<div class="page-wrap">
<div class="topbar">
<ul>
<li>Home</li>
<li>Projects</li>
<li>Clients</li>
<li>Blog</li>
<li>Contact</li>
</ul>
</div>
<label for="topbartoggler" class="toggle"><img src="http://bower.io/img/bower-logo.png" alt="logo" class="logo"></label>
<div class="page-content">
<div class="box1"></div>
<div class="box2"></div>
<div class="box3"></div>
</div>
<header class="row-basic">
<nav>
<img src="http://bower.io/img/bower-logo.png" alt="logo" class="logo">
</nav>
<div class="user-tools">
<div class="toggle"></div>
<div class="mobile-nav-toggle">
<span></span>
</div>
</div>
</header>
</div>
</body>
How could one create arbitrary curves with just pure CSS? Is there a 'Bezier' library? I didn't find anything that could match the curve of the outer edge of the logo below.
Looking at the the Shapes of CSS, I think the logo could be approximated with 2 long pink and black rectangle with completely rounded edges tilted 45deg, 3 small white circles in the middle, and some large circles on either side of the rectangles to give that little 'dent'.
Can this shape really be made with just circles?
Update: This is what I've come up with so far (here's a JSFiddle):
<span class='grey logo'>
<span class='black circle' id='left_middle'> </span>
<span class='grey circle' id='left_top'> </span>
<span class='grey circle' id='left_bottom'> </span>
<span class='left black circle'> </span>
<span class='left white small circle'> </span>
<span class='top grey circle' id='left_right'> </span>
<span class='pink circle' id='right_middle'> </span>
<span class='top pink circle'> </span>
<span class='top white small circle'> </span>
<span class='right pink circle'> </span>
<span class='right white small circle'> </span>
<span class='grey circle' id='right_top'> </span>
<span class='grey circle' id='right_bottom'> </span>
</span>
and:
/* normalize CSS */
.logo, .logo *, .logo *:before, .logo *:after {
display: block;
margin: 0;
padding: 0;
background: transparent;
font: normal normal 0/0 serif;
border: 0;
outline: 0;
}
.logo {
position: relative;
overflow: hidden;
margin: 0 0;
width: 500px;
height: 500px;
}
.logo * {
position: absolute;
}
/* colors */
.logo [class*=pink] {
background-color: rgb(217, 27, 91);
}
.logo [class*=white] {
background-color: white;
}
.logo [class*=black] {
background-color: black;
}
[class*=grey] {
background-color: rgb(240, 240, 240)
}
/* shapes */
.logo [class*=circle] {
width: 100px;
height: 100px;
border-radius: 50px;
-moz-border-radius: 50;
-webkit-border-radius: 50px;
}
.logo [class*=small] {
margin-left: 20px;
margin-top: 20px;
width: 60px;
height: 60px;
}
/* positions */
.logo [class*=top] {
left: 108px;
top: 8px;
}
.logo [class*=left] {
left: 46px;
top: 70px;
}
.logo [class*=right] {
left: 170px;
top: 70px;
}
.logo #left_middle {
left: 76px;
top: 40px;
}
.logo #right_middle {
left: 140px;
top: 40px;
}
.logo #left_top {
left: 13px;
top: -25px;
}
.logo #right_top {
left: 203px;
top: -25px;
}
.logo #left_bottom {
left: 141px;
top: 103px;
}
.logo #right_bottom {
left: 75px;
top: 103px;
}
.logo #left_right {
margin-left: -5px;
margin-top: -5px;
width: 110px;
height: 110px;
}
The problem now is, no matter how I arrange my elements, the stacking is always messed up.
The problem is from GCI 2013.
Something to get you started
CSS
.circ {
width: 100px;
height: 100px;
background: red;
-moz-border-radius: 50;
-webkit-border-radius: 50px;
border-radius: 50px;
}
.circ-small {
width: 65px;
height: 65px;
background: #fff;
-moz-border-radius: 33;
-webkit-border-radius: 33px;
border-radius: 33px;
}
div{
position:absolute;
}
HTML
<div class="circ" style="left:40px;top:40px;"></div>
<div class="circ"></div>
<div class="circ" style="left:70px;top:70px;"></div>
<div class="circ" style="left:103px;top:-25px;background-color:#fff"></div>
<div class="circ" style="left:-25px;top:103px;background-color:#fff"></div>
<div class="circ-small" style="left:25px;top:25px;"></div>
<div class="circ-small" style="left:88px;top:88px;"></div>
To leave you with a small rest of homework for the challenge, I'll just post the beginning of the code which won't suffer of overlapping issues. If you inspect the code carefully, you will see, that I didn't work with full circles here, but used a mix of transparent and colored borders. This solves the overlapping issue as well as decreasing the number of elements needed in total.
Your starting point
The essential part are the pseudo elements (here with different colors and z-indizes):
.pinky:before{
right:-84px;bottom:-1px;
height:30px;width:50px;
border-radius:50%;
z-index:1;
border:20px solid transparent;
border-bottom-color: $pink;
#include transform( rotate(45deg) );
}
You should start with changing colors and z-indizes for yourself to see how it was built and once you got into it complete the rest of the logo.
I did it! I had to get used to only being able to use 'border-radius' for any kind of shape in CSS† though (note: not entirely true).
The main problem here is the overlapping one caused by a cycle of shapes having to be above each other.
The 2 main approaches here are:
using a transparent shape and a solid right border (thanks, #Christoph!) to 'cut' from the gear connector (shown below);
simulating negative border-radii using CS3 gradients for the gear connector so no shapes to cut the part that we don't want are required (better, as allows for a transparent background);
Here's a JSFiddle with the compiled CSS, and the result of the first approach.
HTML:
<span class='wrapper'>
<span class='logo'>
<span class='circle black' id='left_middle'> </span>
<span class='circle dark_grey' id='left_right'> </span>
<span class='circle grey' id='left_left'> </span>
<span class='circle left black'> </span>
<span class='circle left small white'> </span>
<span class='circle top grey' id='left_top'> </span>
<span class='circle pink' id='right_middle'> </span>
<span class='circle grey' id='right_right'> </span>
<span class='grey' id='right_left'> </span>
<span class='circle top pink'> </span>
<span class='circle top white small'> </span>
<span class='circle right pink'> </span>
<span class='circle right small white'> </span>
</span>
<span class='text'>
<span class='bold'>BRL</span><span class='thin'>CAD</span>
</span>
</span>
SCSS/SASS:
/* Fonts */
#font-face {
font-family: 'BRL-CAD';
src: url('fonts/Grandesign Neue Roman.ttf');
}
#font-face {
font-family: 'BRL-CAD Bold';
src: url('fonts/Grandesign Neue Roman Bold.ttf');
}
/* Shapes */
$large_radius: 75px;
$small_radius: 45px;
/* Positions */
$all_left: 10px;
$all_top: 55px;
$top_left: $all_left + 55px;
$top_top: $all_top;
$left_left: $all_left;
$left_top: $all_top + 52px;
$right_left: $all_left + 100px;
$right_top: $all_top + 57px;
$right_middle_left: ($top_left + $right_left) / 2;
$right_middle_top: ($top_top + $right_top) / 2;
$right_right_left: $all_left + 129px;
$right_right_top: $all_top - 11.5px;
$right_left_diff: 50px;
$right_left_left: $all_left + 63px;
$right_left_top: $all_top + 72.5px;
$left_middle_left: ($top_left + $left_left) / 2;
$left_middle_top: ($top_top + $left_top) / 2;
$left_right_left: $all_left + 73.5px;
$left_right_top: $all_top + 64.5px;
$left_left_left: $all_left - 18px;
$left_left_top: $all_top - 21px;
$left_top_diff: 3px;
$left_top_left: $top_left - $left_top_diff;
$left_top_top: $top_top - $left_top_diff;
$logo_width: $right_left + $large_radius + $all_left;
$logo_height: $right_top + $large_radius + $all_top ;
$all_width: $logo_width + 290px;
$all_height: $logo_height;
/* Colors */
$pink: rgb(217, 27, 91);
$grey: rgb(235, 235, 235);
$dark_grey: rgb(230, 230, 230);
/* Normalized CSS */
.wrapper, .wrapper .logo, .wrapper .logo *, .wrapper .logo *:before, .wrapper .logo *:after {
display: block;
margin: 0;
padding: 0;
border: 0;
outline: 0;
background: transparent;
}
/* Logo + Text */
.wrapper {
/* CSS Tricks */
position: relative;
overflow: hidden;
width: $all_width ;
height: $all_height;
> * {
float:left;
display:inline;
}
/* Background */
$start: rgb(240, 240, 240);
$stop: rgb(225, 225, 225);
background: $dark_grey; // non-CSS3 browsers
background: -webkit-gradient(linear, left top, left bottom, from($start), to($stop)); // for WebKit
background: -moz-linear-gradient(top, $start, $stop); // for Firefox
background: linear-gradient(0deg, $stop, $start); // for standards-compliance
/* Logo */
.logo {
/* CSS Tricks */
#extend .wrapper;
width: $logo_width ;
height: $logo_height;
* {
position: absolute;
}
/* Colors */
#mixin colorize($name, $color) {
[class*=#{$name}] {
background-color: $color;
}
}
#include colorize('white', white);
#include colorize('black', black);
#include colorize('pink', $pink);
#include colorize('grey', $grey);
#include colorize('dark_grey', $dark_grey);
/* Shapes */
[class*=circle] {
width: $large_radius;
height: $large_radius;
border-radius: 50%;
}
[class*=small] {
$margin: ($large_radius - $small_radius) / 2;
margin-left: $margin;
margin-top: $margin;
width: $small_radius;
height: $small_radius;
}
/* Classes and IDs */
[class*=top] {
left: $top_left;
top: $top_top;
}
[class*=left] {
left: $left_left;
top: $left_top;
}
[class*=right] {
left: $right_left;
top: $right_top;
}
#right_middle {
left: $right_middle_left + 5px;
top: $right_middle_top;
}
#right_right {
left: $right_right_left;
top: $right_right_top;
}
#right_left {
left: $right_left_left;
top: $right_left_top;
$radius: $right_left_diff;
width: $radius / 2;
height: $radius;
border-right: $radius / 4 solid $dark_grey;
border-radius: 0 $radius / 2 $radius / 2 0;
background: transparent;
}
#left_middle {
left: $left_middle_left; //76px;
top: $left_middle_top; //40px;
}
#left_right {
left: $left_right_left;
top: $left_right_top;
}
#left_left {
left: $left_left_left;
top: $left_left_top;
}
#left_top {
left: $left_top_left;
top: $left_top_top;
$radius: $large_radius + 2*$left_top_diff;
width: $radius;
height: $radius;
}
}
/* Text */
.text {
margin-left: 5px;
margin-top: $all_top + 10px;
font-size: 75px;
.bold {
color: $pink;
font-weight: bold;
font-family: 'BRL-CAD Bold', sans-serif;
}
.thin {
color: black;
font-family: 'BRL-CAD', sans-serif;
}
}
}