Created
March 7, 2017 08:31
-
-
Save momin-riyadh/4b6781c3f3c0387a8b364c6b9fa87f8e to your computer and use it in GitHub Desktop.
BEM CODE Formation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html class="no-js" lang=""> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="x-ua-compatible" content="ie=edge"> | |
| <title></title> | |
| <meta name="description" content=""> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <link rel="apple-touch-icon" href="apple-touch-icon.png"> | |
| <!-- Place favicon.ico in the root directory --> | |
| <link rel="stylesheet" href="css/normalize.css"> | |
| <link rel="stylesheet" href="css/main.css"> | |
| <script src="js/vendor/modernizr-2.8.3.min.js"></script> | |
| <style> | |
| /* Block */ | |
| .btn { | |
| text-decoration: none; | |
| background-color: white; | |
| color: #888; | |
| border-radius: 5px; | |
| display: inline-block; | |
| margin: 10px; | |
| font-size: 18px; | |
| text-transform: uppercase; | |
| font-weight: 600; | |
| padding: 10px 5px; | |
| } | |
| /* Element */ | |
| .btn__price { | |
| background-color: white; | |
| color: #fff; | |
| padding-right: 12px; | |
| padding-left: 12px; | |
| margin-right: -10px; /* realign button text padding */ | |
| font-weight: 600; | |
| background-color: #333; | |
| opacity: .4; | |
| border-radius: 5px 0 0 5px; | |
| } | |
| /* Element */ | |
| .btn__text { | |
| padding: 0 10px; | |
| border-radius: 0 5px 5px 0; | |
| } | |
| /* Modifier */ | |
| .btn--big { | |
| font-size: 28px; | |
| padding: 10px; | |
| font-weight: 400; | |
| } | |
| /* Modifier */ | |
| .btn--blue { | |
| border-color: #0074D9; | |
| color: white; | |
| background-color: #0074D9; | |
| } | |
| /* Modifier */ | |
| .btn--orange { | |
| border-color: #FF4136; | |
| color: white; | |
| background-color: #FF4136; | |
| } | |
| /* Modifier */ | |
| .btn--green { | |
| border-color: #3D9970; | |
| color: white; | |
| background-color: #3D9970; | |
| } | |
| body { | |
| font-family: "fira-sans-2", sans-serif; | |
| background-color: #ccc; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <!--[if lt IE 8]> | |
| <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade | |
| your browser</a> to improve your experience.</p> | |
| <![endif]--> | |
| <a href="http://css-tricks.com" class="btn"> | |
| <span class="btn__text">Standard button</span> | |
| </a> | |
| <a href="http://css-tricks.com" class="btn btn--orange btn--big"> | |
| <span class="btn__price">$3</span> | |
| <span class="btn__text">Big button</span> | |
| </a> | |
| <a href="http://css-tricks.com" class="btn btn--blue btn--big"> | |
| <span class="btn__price">$4</span> | |
| <span class="btn__text">Big button</span> | |
| </a> | |
| <a href="http://css-tricks.com" class="btn btn--green btn--big"> | |
| <span class="btn__price">$9</span> | |
| <span class="btn__text">Big button</span> | |
| </a> | |
| <script src="https://code.jquery.com/jquery-1.12.0.min.js"></script> | |
| <script>window.jQuery || document.write('<script src="js/vendor/jquery-1.12.0.min.js"><\/script>')</script> | |
| <script src="js/plugins.js"></script> | |
| <script src="js/main.js"></script> | |
| <!-- Google Analytics: change UA-XXXXX-X to be your site's ID. --> | |
| <script> | |
| (function (b, o, i, l, e, r) { | |
| b.GoogleAnalyticsObject = l; | |
| b[l] || (b[l] = | |
| function () { | |
| (b[l].q = b[l].q || []).push(arguments) | |
| }); | |
| b[l].l = +new Date; | |
| e = o.createElement(i); | |
| r = o.getElementsByTagName(i)[0]; | |
| e.src = 'https://www.google-analytics.com/analytics.js'; | |
| r.parentNode.insertBefore(e, r) | |
| }(window, document, 'script', 'ga')); | |
| ga('create', 'UA-XXXXX-X', 'auto'); | |
| ga('send', 'pageview'); | |
| </script> | |
| </body> | |
| </html> |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
YANDEX BEM Methodology