Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&family=Rancho&display=swap" rel="stylesheet">


<main class="whole-page">
  <!--Header-->
  <header>
    <h1 id="title">Cozy Cups</h1>
    <h2 id="title">Customer Satisfaction Survey</h2>
    <div class="p_container">
    <p id="description">At Cozy Cups, we strive spread joy- one cup at a time. We value your feedback and would love to hear about your experience with us. </p>
    <p><br>To complete this survey, you will need the <strong>code</strong> printed on your <strong>receipt</strong> from your recent visit</p>
    <p><br>Upon completion of this survey you will be given a validation code that can be redeemed for a <strong>free coffee</strong>.</p>
    </div>
  </header>
  
  
  
      
<!--Heart illustration-->
<div class="container-cell">
<div class="container">
  <div class="circle">
    <div class="hearts">
      <div id="heart3"></div>
      <div id="heart2"></div>
      <div id="heart1"></div>
    </div>
    <div class="cup">
      <div class="cup-top"></div>
      <div class="cup-body"></div>
      <div id="cup-heart"></div>
      <div class="cup-ear"></div>
      <div class="cup-ear inner"></div>
    </div>
  </div>
</div>
</div>
  
  
  
  
  
  <!--Form-->
  <form id="survey-form">
    
    <!--Name-->
    <label for="name" id="name-label"><strong>Name</strong></label>
    <input id="name" type"text" placeholder="Enter your name" required>
    
    <!--Email-->
    <label for="email" id="email-label"><strong>Email</strong></label>
    <input id="email" type="email" placeholder="Enter your email" required>
    
    <!--Receipt Code-->
    <label for="receipt-code" id="receipt-code-label"><strong>Receipt Code</strong></label>
    <input id="receipt-code" type="text" placeholder="Enter the receipt code">
    
    <!--Dropdown-->
    <p><strong>Which one of our locations did you visit?</strong></p>
      <select id="dropdown" name="location">
        <option disabled selected value>Select a location</option>
        <option value="Kansas">Kansas City, KS.</option>
        <option value="Missouri">Columbia, MO.</option>
        <option value="Indiana">Bloomington, IN.</option>
        <option value="Illinois">Springfield, IL.</option>
      </select>
    
    <!--Number-->
    <label for="number" id="number-label"><strong>Total items purchased</strong></label>
    <input id="number" type="number" min="1" max="100" placeholder="Total Items Purchased">
      
  
     
      <!--Overall Experience radio buttons-->
      <div class="exp-questions">
        <p><strong>Generally, how would you rate your overall experience?</strong></p> 
      <label><input name="overall-exp" value="pos" type="radio" checked/>Positive</label>
      <label><input name="overall-exp" value="neg" type="radio" />Negative</label>
       </div>
      
      
      <!--Bulk Questions-->
    <div class="bulk-questions">
      
      <p><strong>Please rate your satisfaction with...</strong></p>
      <!--Accuracy radio buttons-->
      <p><strong>The accuracy of your order.</strong></p> 
      <label><input name="accuracy" value="sat" type="radio" />Satisfied</label>
      <label><input name="accuracy" value="dissat" type="radio" />Dissatisfied</label>
      
     <!--Friendliness radio buttons-->
      <p><strong>The friendliness of the staff.</strong></p> 
      <label><input name="friendliness" value="sat" type="radio" />Satisfied</label>
      <label><input name="friendliness" value="dissat" type="radio" />Dissatisfied</label>
      
      
      <!--Cleanliness radio buttons-->
      <p><strong>The cleanliness of the café.</strong></p> 
      <label><input name="cleanliness" value="sat" type="radio" />Satisfied</label>
      <label><input name="cleanliness" value="dissat" type="radio" />Dissatisfied</label>
  
      
       <!--Speed radio buttons-->
      <p><strong>The speed of service.</strong></p> 
      <label><input name="speed" value="sat" type="radio" />Satisfied</label>
      <label><input name="speed" value="dissat" type="radio" />Dissatisfied</label>
     
      
      <!--Taste radio buttons-->
      <p><strong>The taste of items.</strong></p> 
      <label><input name="taste" value="sat" type="radio" />Satisfied</label>
      <label><input name="taste" value="dissat" type="radio" />Dissatisfied</label>

      </div>
      
           
    <!--Where do you enjoy options-->
    <p><strong>How do you prefer to order?</strong></p>
      <select id="order-preference" name="order-preference" required>
        <option disabled selected value>Select how you order </option>
        <option value="dining">Indoor Dining Area</option>
        <option value="drive-thru">Drive Thru </option>
        <option value="patio">Outdoor Patio</option>
        <option value="other">Other</option>
      </select>
      
    <!--How did you hear-->
      <p><strong>How did you hear about us?
        <span class="clue">(Check all that apply)</strong></span>
      </p>
      
      <label><input name="referral" value="wordOfMouth" type="checkbox" />Word Of Mouth</label>
       <label><input name="referral" value="social-media" type="checkbox" />Social Media</label>
      <label><input name="referral" value="search" type="checkbox" />Search Engine</label>
      <label><input name="referral" value="other" type="checkbox" />Other</label>
      
       <!--Recommendation radio buttons-->
    <p><strong>Would you recommend Cozy Cups to a friend?</strong></p> 
      <label><input name="recommend" value="yes" type="radio" checked/>Yes</label>
      <label><input name="recommend" value="no" type="radio" />No</label>
      
      <!--Free coffee radio buttons-->
    <p><strong>Select your free coffee<span class="clue">(size 16oz each)</strong></span></p> 
      <label><input name="free-coffee" value="coffee-reg" type="radio" checked/>Regular Coffee</label>
      <label><input name="free-coffee" value="spec-coffee" type="radio" />Specialty Coffee</label>
      <label><input name="free-coffee" value="latte" type="radio" />Latte</label>
      <label><input name="free-coffee" value="spec-latte" type="radio" />Specialty Latte</label>
      
      <!--Comments radio buttons-->
    <p><strong>Any comments or suggestions?</strong></p> 
      <textarea id="comments" name="comment" placeholder="Enter your comment here..."></textarea>
      
      <!--Submit button-->
      <button type="submit" id="submit">Submit</button>
      
  </form>
    
    
</main>

              
            
!

CSS

              
                body{
  background: #FDF7EF;
  padding: 5px;
  padding-top: 0;
  margin-top: 0;
}

main{
  width: 430px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 0 auto;
}

header{
  text-align: left;
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  text-align: center;
}

header h1{
  font-size: 33px;
  font-family: 'Rancho', cursive;
  padding: 20px;
  background: rgb(253,247,239);
  background: linear-gradient(90deg, rgba(253,247,239,1) 0%,     rgba(254,230,212,1) 40%, rgba(255,218,193,1) 50%, rgba(254,231,213,1) 62%, rgba(253,247,239,1) 100%);
  margin-top: 0;
}

strong{
  font-weight: bold;
}

header h2{
  font-size: 34px;
  font-weight: 400;
}

header p{
  width: 360px;
  margin: 0 auto;
  font-weight: 400;
}


.p_container{
  margin-bottom: 20px;
}


/* Cup Illustration */

.container-cell{
  display: flex;
  flex-direction: row;
  align-self: flex-start;
  width: 426px;
  height: 300px;
  align-items: center;
  margin-top: 50px;
  margin-bottom: -30px;
  border: 2px solid black;
  border-top-right-radius: 75px;
  border-top-left-radius: 75px;
  border-bottom: none;
}

.container{
  right: 18%;
  bottom: 35%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
/*   top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); */
  transform: scale(0.37);
}

.circle{
  border: 40px solid black;
  border-radius: 100%;
  width: 500px;
  height: 500px;
  background: #FFC0CA;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
}

.hearts{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  width: 170px;
  position: relative;
  top: 30px;
}

#heart1{
  position: relative;
  width: 100px;
  height: 90px;
  right: 30px;
  top: 120%;
  animation: heart-float1 5s infinite;
  animation-timing-function: ease-in-out;
}

#heart1:before,
#heart1:after{
  position: absolute;
  content: "";
  left: 38px;
  top:0;
  width: 40px;
  height: 60px;
  background: #FF7373;
  border-radius: 50px 50px 0 0;
  transform: rotate(-45deg);
  transform-origin: 0 100%;
}

#heart1:after{
  left: 0;
  transform: rotate(45deg);
  transform-origin: 100% 100%;
}

#heart2{
  position: relative;
  width: 20px;
  height: 20px;
  left: 10px;
  top: 20px;
  animation: heart-float2 7s infinite;
  animation-timing-function: ease-in-out;
  animation-delay: 1.3s;
}

#heart2:before,
#heart2:after{
  position: absolute;
  content: "";
  left: 30px;
  top:0;
  width: 30px;
  height: 50px;
  background: #FBCCAD;
  border-radius: 50px 50px 0 0;
  transform: rotate(-45deg);
  transform-origin: 0 100%;
}

#heart2:after{
  left: 0;
  transform: rotate(45deg);
  transform-origin: 100% 100%;
}

#heart3{
  position: relative;
  width: 20px;
  height: 20px;
  right: 35px;
  top: 15px;
  animation: heart-float4 3s infinite;
  animation-timing-function: ease-in-out;
}

#heart3:before,
#heart3:after{
  position: absolute;
  content: "";
  left: 24px;
  top:0;
  width: 25px;
  height: 35px;
  background: #FF7373;
  border-radius: 50px 50px 0 0;
  transform: rotate(-45deg);
  transform-origin: 0 100%;
}

#heart3:after{
  left: 0;
  transform: rotate(45deg);
  transform-origin: 100% 100%;
}

@keyframes heart-float1{
  from{
    top: 120%;
    opacity: 1;
  }
  to{
    top: 18%;
    opacity: 0;
  }
}

@keyframes heart-float2{
  from{
    top: 120%;
    opacity: 1;
  }
  to{
    top: 3%;
    opacity: 0;
  }
}

@keyframes heart-float4{
  from{
    top: 120%;
    opacity: 1;
  }
  to{
    top: 3%;
    opacity: 0;
  }
}

.cup{
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  top: 10%;
}

.cup-top{
  width: 262px;
  height: 25px;
  background: #F89B8B;
  border-radius: 100px / 20px;
  border: 8px solid #7E2D4E;
  position: relative;
  top: 25px;
}

.cup-body{
  width: 260px;
  height: 200px;
  background: #FAEAC1;
  border-bottom-left-radius: 100px;
  border-bottom-right-radius: 100px;
  border: 8px solid #7E2D4E;
}

#cup-heart{
  position: relative;
  width: 20px;
  height: 20px;
  right: 65px;
  bottom: 160px;
}

#cup-heart:before,
#cup-heart:after{
  position: absolute;
  content: "";
  left: 80px;
  top:0;
  width: 80px;
  height: 120px;
  background: #FF7373;
  border-radius: 50px 50px 0 0;
  transform: rotate(-45deg);
  transform-origin: 0 100%;
}

#cup-heart:after{
  left: 0;
  transform: rotate(45deg);
  transform-origin: 100% 100%;
}

.cup-ear{
  width: 65px;
  height: 90px;
  background: #FBCCAD;
  border-top-right-radius: 70%;
  border-bottom-right-radius: 70%;
  position: relative;
  bottom: 48%;
  left: 62%;
  border: 8px solid #7E2D4E;
}

.inner{
  width: 33px;
  height: 38px;
  bottom: 66%;
  left: 56%;
  background: #FFC0CA;
}

.saucer{
  width: 385px;
  height: 100px;
  background: #FF7373;
  align-self: flex-start;
}

#survey-form{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 0 auto;
  border-left: 2px solid black;
  border-right: 2px solid black;
  border-bottom: 2px solid black;
  margin-top: -70px;
  padding-left: 10px;
  padding-right: 10px;
  padding-bottom: 10px;
  font-size: 16px;
  font-family: 'Poppins', sans-serif;

}

#survey-form input[type=text]{
  padding: 12px 20px;
  background-color: #FFDAC1;
  font-size: 16px;
  border: 1px solid #fff4e6;
  border-radius: 4px;
}

#survey-form textarea{
  padding: 12px 20px;
  background-color: #FFDAC1;
  font-size: 16px;
  border: 1px solid #fff4e6;
  border-radius: 4px;
}

#survey-form input[type=number]{
  padding: 12px 20px;
  background-color: #FFDAC1;
  font-size: 16px;
  border: 1px solid #fff4e6;
  border-radius: 4px;
}

#survey-form select{
  padding: 12px 20px;
  background-color: #FFDAC1;
  font-size: 16px;
  border: 1px solid #fff4e6;
  border-radius: 4px;
}

#survey-form input{
  padding: 12px 20px;
  background-color: #FFDAC1;
  font-size: 16px;
   border: 1px solid #fff4e6;
  border-radius: 4px;
}

#survey-form input[type=radio]{
  padding: 12px 20px;
  background-color: #FFDAC1;
  font-size: 16px;
}


#survey-form label{
  padding: 12px 20px;
  font-size: 16px;
  margin-top: 20px;
}

#survey-form button{
  background-color: #FF7373;
  padding: 14px 20px;
  margin: 8px 0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

#survey-form button:hover{
  box-shadow: 6px 2px 5px #DD6262;
  font-size: 16px;
}

::placeholder{
  color:black;
  font-size: 16px;
}


.exp-questions{
  margin-top: 60px;
  border-top: 1px solid black;
}
              
            
!

JS

              
                // !! IMPORTANT README:

// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place. 

/***********
INSTRUCTIONS:
  - Select the project you would 
    like to complete from the dropdown 
    menu.
  - Click the "RUN TESTS" button to
    run the tests against the blank 
    pen.
  - Click the "TESTS" button to see 
    the individual test cases. 
    (should all be failing at first)
  - Start coding! As you fulfill each
    test case, you will see them go   
    from red to green.
  - As you start to build out your 
    project, when tests are failing, 
    you should get helpful errors 
    along the way!
    ************/

// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!

// Once you have read the above messages, you can delete all comments. 

              
            
!
999px

Console