{"id":15441,"date":"2012-11-14T21:01:31","date_gmt":"2012-11-14T13:01:31","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=15441"},"modified":"2025-04-04T01:14:23","modified_gmt":"2025-04-03T17:14:23","slug":"sass-compass-vcard","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/sass-compass-vcard\/","title":{"rendered":"Creating an Interactive Online vCard Using Sass &#038; Compass"},"content":{"rendered":"<p>Today, we\u2019re going to continue our discussion on <a href=\"https:\/\/www.hongkiat.com\/blog\/tag\/sass\/\">Sass<\/a>. This time, we\u2019ll take a practical approach and build an online <a href=\"https:\/\/en.wikipedia.org\/wiki\/VCard\" rel=\"nofollow noopener\" target=\"_blank\">vCard<\/a> using Sass along with <a href=\"http:\/\/compass-style.org\/\" rel=\"nofollow noopener\" target=\"_blank\">Compass<\/a>.<\/p>\n<p>The goal is to make the vCard easily adjustable for color and size. We\u2019ll utilize several Sass and Compass features, including <strong>Variables, Mixins, Operations, Selector Inheritance, Nested Rules<\/strong>, and <strong>Compass Helpers<\/strong>. If you missed our previous posts in this series, it\u2019s a good idea to check them out before continuing.<\/p>\n<h2>Planning and Wireframing<\/h2>\n<p>Planning is essential when working with Sass and Compass. It\u2019s important to have a clear vision of the final result, whether it\u2019s a page or a website. Browsing sites like <a href=\"https:\/\/www.behance.net\/\" rel=\"nofollow noopener\" target=\"_blank\">Behance<\/a> or <a href=\"https:\/\/dribbble.com\/\" rel=\"nofollow noopener\" target=\"_blank\">Dribbble<\/a> can provide inspiration. After gathering ideas, draft them on paper or create a wireframe, like the example below.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/sass-compass-vcard\/sass-vcard.jpg\" alt=\"Wireframe example of a vCard created with Sass and Compass\" width=\"500\" height=\"300\"><\/figure>\n<p>As shown in the image above, our vCard will include <strong>contact info<\/strong> about \u2018John\u2019 \u2013 a profile picture, some information such as his name, email address, phone number, and a brief description of who he is or what he does. This will be our \u2018bio\u2019 section.<\/p>\n<p>Below that, we\u2019ll have his social identities in the form of social buttons, which will make up our \u2018social\u2019 section.<\/p>\n<h2>Preparing Assets<\/h2>\n<p>Before we start coding, let\u2019s get some essentials ready. By now, you should have Sass and Compass installed on your machine.<\/p>\n<p>If you\u2019re unsure whether you have them installed, you can run the command <code>sass -v<\/code> or <code>compass -v<\/code> in the <strong>Command Prompt or Terminal<\/strong>. Alternatively, you can use an application like <a href=\"https:\/\/github.com\/mhs\/scout-app\" rel=\"nofollow noopener\" target=\"_blank\">Scout App<\/a> if you prefer working with a GUI.<\/p>\n<p>We will also need a few assets, such as font icons and social media icons, which you can get from sources like <a href=\"https:\/\/www.fontsquirrel.com\/\/fonts\/modern-pictograms\" rel=\"nofollow noopener\" target=\"_blank\">ModernPictograms<\/a>.<\/p>\n<p>Lastly, since we are using Command Prompt\/Terminal for this tutorial, navigate to your directory and start the Compass project with these commands: <code>compass init<\/code> and <code>compass watch<\/code>.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/sass-compass-vcard\/compass-watch.jpg\" alt=\"Compass watch command example\" width=\"500\" height=\"300\"><\/figure>\n<h2>HTML Markup<\/h2>\n<p>Below is the HTML markup for our vCard. It\u2019s straightforward, with all sections wrapped within logical <a href=\"https:\/\/www.hongkiat.com\/blog\/tag\/series-html5-css3-tuts\/\/\" rel=\"nofollow noopener\" target=\"_blank\">HTML5 tags<\/a> like <code>&lt;section&gt;<\/code>.<\/p>\n<pre>\r\n&lt;div class=\"vcard\"&gt;\r\n  &lt;section class=\"bio cf\"&gt;\r\n    &lt;img src=\"images\/me.jpg\" width=\"80\" height=\"80\"&gt;\r\n    &lt;div class=\"detail\"&gt;\r\n      &lt;ul&gt;\r\n        &lt;li class=\"name\"&gt;Thoriq Firdaus&lt;\/li&gt;\r\n        &lt;li class=\"email\"&gt;me@email.com&lt;\/li&gt;\r\n        &lt;li class=\"phone\"&gt;(+62)1.2345.678.9&lt;\/li&gt;\r\n        &lt;li class=\"desc\"&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse dolor neque, eleifend at pellentesque quis, convallis sit amet tellus. Etiam et auctor arcu.&lt;\/li&gt;\r\n      &lt;\/ul&gt;\r\n    &lt;\/div&gt;\r\n  &lt;\/section&gt;\r\n  &lt;section class=\"social cf\"&gt;\r\n    &lt;ul&gt;\r\n      &lt;li class=\"social-facebook\"&gt;&lt;a href=\"#\"&gt;Facebook&lt;\/a&gt;&lt;\/li&gt;\r\n      &lt;li class=\"social-twitter\"&gt;&lt;a href=\"#\"&gt;Twitter&lt;\/a&gt;&lt;\/li&gt;\r\n      &lt;li class=\"social-google\"&gt;&lt;a href=\"#\"&gt;Google+&lt;\/a&gt;&lt;\/li&gt;\r\n      &lt;li class=\"social-dribbble\"&gt;&lt;a href=\"#\"&gt;Dribbble&lt;\/a&gt;&lt;\/li&gt;\r\n    &lt;\/ul&gt;\r\n  &lt;\/section&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>As you can see, the social identities in the \u2018social\u2019 section are structured within list elements so we can easily display them side-by-side. Each is given a class name following this convention: <code>social-facebook<\/code>, <code>social-twitter<\/code>, <code>social-google<\/code>, and so on.<\/p>\n<h2>Compass Configuration<\/h2>\n<p>We need to configure Compass a bit by uncommenting a few lines in the <code>config.rb<\/code> file, as follows:<\/p>\n<pre>\r\n# You can select your preferred output style here (can be overridden via the command line):\r\noutput_style = :expanded\r\n\r\n# To enable relative paths to assets via compass helper functions. Uncomment:\r\nrelative_assets = true\r\n\r\n# To disable debugging comments that display the original location of your selectors. Uncomment:\r\nline_comments = false\r\n<\/pre>\n<p>If you cannot find the <code>config.rb<\/code> file, you probably haven\u2019t run the command <code>compass init<\/code> in your project directory.<\/p>\n<h2>Importing Files<\/h2>\n<p>Since we will be using Compass, we need to import it using:<\/p>\n<pre>\r\n@import \"compass\";\r\n<\/pre>\n<p>I prefer to reset default browser styles so that the output renders more consistently. Compass has a <a href=\"http:\/\/compass-style.org\/reference\/compass\/reset\/\" rel=\"nofollow noopener\" target=\"_blank\">Reset module<\/a> based on <a href=\"https:\/\/meyerweb.com\/eric\/tools\/css\/reset\/\" rel=\"nofollow noopener\" target=\"_blank\">Eric Meyer\u2019s CSS reset<\/a>, which can be imported using:<\/p>\n<pre>\r\n@import \"compass\/reset\";\r\n<\/pre>\n<p>However, I prefer using <a href=\"https:\/\/github.com\/necolas\/normalize.css\/\" rel=\"nofollow noopener\" target=\"_blank\">Normalize<\/a>, which <strong><a href=\"https:\/\/github.com\/JohnAlbin\/normalize.css-with-sass-or-compass\" rel=\"nofollow noopener\" target=\"_blank\">also comes in Sass\/Scss format<\/a><\/strong>. Download the <a href=\"https:\/\/github.com\/JohnAlbin\/normalize.css-with-sass-or-compass\" rel=\"nofollow noopener\" target=\"_blank\">file here<\/a>, save it in your <code>sass<\/code> working directory, and import it into your stylesheet:<\/p>\n<pre>\r\n@import \"normalize\";\r\n<\/pre>\n<p><strong>Recommended Reading:<\/strong> <a href=\"https:\/\/www.hongkiat.com\/blog\/css-priority-level\/\" rel=\"nofollow noopener\" target=\"_blank\">Reviewing CSS Style Priority Level<\/a><\/p>\n<h2>Variables<\/h2>\n<p>We will have a few constant values in the stylesheet, so we will store them in variables. These two variables below will define the base color of our vCard.<\/p>\n<pre>\r\n$base: #fff;\r\n$dark: darken($base, 10%);\r\n<\/pre>\n<p>The <code>$width<\/code> variable below will define our page\u2019s width; it will also serve as the basis for defining other element sizes.<\/p>\n<pre>\r\n$width: 500px;\r\n$space: $width \/ 25; \/\/ = 20px\r\n<\/pre>\n<p>The <code>$space<\/code> variable, as you can see, will be the default spacing or column size in our vCard, which in this example is <code>20px<\/code>.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/sass-compass-vcard\/sass-column.jpg\" alt=\"Example of a Sass column layout\" width=\"500\" height=\"300\"><\/figure>\n<p>Compass also has helpers to detect image size, and we will make use of this feature on our profile picture, as follows:<\/p>\n<pre>\r\n$img: image-width(\"me.jpg\") + (($space \/ 4) * 2);\r\n<\/pre>\n<p>The extra <strong>addition<\/strong> of <code>(($space \/ 4) * 2)<\/code> in the code above is to calculate the total image width, including the border that will frame the picture. A frame generally has two sides; <strong>top and bottom \/ left and right<\/strong>, which is why we multiply the <strong>division result<\/strong> by <code>2<\/code>.<\/p>\n<h2>Selector Inheritance<\/h2>\n<p>There are a few selectors in our stylesheet that share the same styling rules. To avoid repetition in our code, we will specify these styles initially and inherit them with the <code>@extend<\/code> directive whenever needed. This method, in Sass, is known as <strong>Selector Inheritance<\/strong>, a very useful feature that is missing in <a href=\"https:\/\/www.hongkiat.com\/blog\/less-css-tutorial-design-slick-menu-nav-bar\/\" rel=\"nofollow noopener\" target=\"_blank\">LESS<\/a>.<\/p>\n<pre>\r\n.float-left {\r\n  float: left;\r\n}\r\n.box-sizing {\r\n  @include box-sizing(border-box);\r\n}\r\n<\/pre>\n<h2>Styles<\/h2>\n<p>Once everything necessary is set up, it\u2019s time to style our vCard, starting with a background color for our HTML document:<\/p>\n<pre>\r\nhtml {\r\n  height: 100%;\r\n  background-color: $base;\r\n}\r\n<\/pre>\n<h3>vCard<\/h3>\n<p>The following styles define the vCard wrapper. If you have worked with LESS before, this code will look familiar and be easy to understand.<\/p>\n<pre>\r\n.vcard {\r\n  width: $width;\r\n  margin: 50px auto;\r\n  background-color: darken($base, 5%);\r\n  border: 1px solid $dark;\r\n  @include border-radius(3px);\r\n  ul {\r\n    padding: 0;\r\n    margin: 0;\r\n    li {\r\n      list-style: none;\r\n    }\r\n  }\r\n}\r\n<\/pre>\n<p>The wrapper\u2019s width inherits the value from the <code>$width<\/code> variable. The background color is darkened by <code>5%<\/code> from the base color, while the border color is darkened by <code>10%<\/code>. This coloring is achieved using <a href=\"https:\/\/sass-lang.com\/docs\/yardoc\/Sass\/Script\/Functions.html\" rel=\"nofollow noopener\" target=\"_blank\">Sass color functions<\/a>.<\/p>\n<p>The vCard will also have <code>3px<\/code> rounded corners, achieved using <a href=\"http:\/\/compass-style.org\/reference\/compass\/css3\/\" rel=\"nofollow noopener\" target=\"_blank\">Compass CSS3 Mixins<\/a>: <code>border-radius(3px)<\/code>.<\/p>\n<h3>Bio Section<\/h3>\n<p>As noted earlier in this tutorial, the vCard can be divided into two sections. These nested styles below define the first section, which contains the profile picture and some details (name, email, and phone).<\/p>\n<pre>\r\n.bio {\r\n  border-bottom: 1px solid $dark;\r\n  padding: $space;\r\n  @extend .box-sizing;\r\n  img {\r\n    @extend .float-left;\r\n    display: block;\r\n    border: ($space \/ 4) solid #ffffff;\r\n  }\r\n  .detail {\r\n    @extend .float-left;\r\n    @extend .box-sizing;\r\n    color: darken($base, 50%);\r\n    margin: {\r\n      left: $space;\r\n      bottom: $space \/ 2;\r\n    }\r\n    width: $width - (($space * 3) + $img);\r\n    li {\r\n      &:before {\r\n        width: $space;\r\n        height: $space;\r\n        margin-right: $space;\r\n        font-family: \"ModernPictogramsNormal\";\r\n      }\r\n      &.name:before {\r\n        content: \"f\";\r\n      }\r\n      &.email:before {\r\n        content: \"m\";\r\n      }\r\n      &.phone:before {\r\n        content: \"N\"; \r\n      }\r\n    }\r\n  }\r\n}\r\n<\/pre>\n<p>There is one thing in the code above that requires your attention. The width in the <code>.detail<\/code> selector is specified with this equation: <code>$width - (($space * 3) + $img);<\/code>.<\/p>\n<p>This equation dynamically calculates the <code>.detail<\/code> width by subtracting the profile picture width and the spaces (padding and margin) from the total width of the vCard.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/sass-compass-vcard\/sass-equation.jpg\" alt=\"Example of a Sass equation for dynamic width calculation\" width=\"500\" height=\"411\"><\/figure>\n<h3>Social Section<\/h3>\n<p>The styles below are for the second section in the vCard. There is no difference with plain CSS here, only now they are nested, and a few values are defined with variables.<\/p>\n<pre>\r\n.social {\r\n  background-color: $dark;\r\n  width: 100%;\r\n  padding: $space;\r\n  @extend .box-sizing;\r\n  ul {\r\n    text-align: center;\r\n    li {\r\n      display: inline-block;\r\n      width: 32px;\r\n      height: 32px;\r\n      a {\r\n        text-decoration: none;\r\n        display: inline-block;\r\n        width: 100%;\r\n        height: 100%;\r\n        text-indent: 100%;\r\n        white-space: nowrap;\r\n        overflow: hidden;\r\n      }\r\n    }\r\n  }\r\n}\r\n<\/pre>\n<p>In this section, we will display the social media icons using the image sprite technique, and Compass has a feature to do that job faster.<\/p>\n<p>First, we need to put our icons in a special folder \u2013 let\u2019s name the folder <strong>\/social\/<\/strong>. Back in the stylesheet, concatenate those icons with the following <code>@import<\/code> rule.<\/p>\n<pre>\r\n@import \"social\/*.png\";\r\n<\/pre>\n<p>The <code>social\/<\/code> above refers to the folder where we store the icons. This folder should be nested within the image folder. Now, if we look in our image folder, we should see a sprite image generated with random characters, like <strong>social-sc805f18607.png<\/strong>. At this point, nothing happens on the front-end until we apply the styles with the following line:<\/p>\n<pre>\r\n@include all-social-sprites;\r\n<\/pre>\n<h2>Final Result<\/h2>\n<p>Finally, after all the hard work, we can now see the result like this:<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/sass-compass-vcard\/sass-vcard-final.jpg\" alt=\"Final result of the Sass vCard\" width=\"500\" height=\"300\"><\/figure>\n<p>If we later think that <code>500px<\/code> is too wide, we only need to change the value in the <code>$width<\/code> variable \u2013 for example, to <code>350px<\/code> \u2013 and the rest will adjust accordingly. You can also experiment with the color variable.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/sass-compass-vcard\/sass-vcard-final-blue.jpg\" alt=\"Final result of the Sass vCard in blue\" width=\"500\" height=\"300\"><\/figure>\n<p><a href=\"https:\/\/hongkiat.github.io\/sass-compass-vcard\/\" class=\"su-button su-button-style-flat\" style=\"color:#FFFFFF;background-color:#2D89EF;border-color:#246ec0;border-radius:0px\" target=\"__blank\" rel=\"noopener nofollow\"><span style=\"color:#FFFFFF;padding:7px 20px;font-size:16px;line-height:24px;border-color:#6cadf4;border-radius:0px;text-shadow:none\"><i class=\"sui sui-external-link\" style=\"font-size:16px;color:#fff\"><\/i>  View demo <\/span><\/a>\n<a href=\"https:\/\/github.com\/hongkiat\/sass-compass-vcard\/\" class=\"su-button su-button-style-flat\" style=\"color:#FFFFFF;background-color:#2D89EF;border-color:#246ec0;border-radius:0px\" target=\"__blank\" rel=\"noopener nofollow\"><span style=\"color:#FFFFFF;padding:7px 20px;font-size:16px;line-height:24px;border-color:#6cadf4;border-radius:0px;text-shadow:none\"><i class=\"sui sui-external-link\" style=\"font-size:16px;color:#fff\"><\/i>  Download source <\/span><\/a><\/p>\n<h2>Conclusion<\/h2>\n<p>In this tutorial, we have shown you how to build a simple online vCard with Sass and Compass. This is just an example, however. Sass and Compass are indeed powerful, but sometimes they are not necessary. For instance, when working on a website with a few pages and fewer lines of styles, using Sass and Compass may be considered excessive.<\/p>\n<p class=\"note\"><strong>Further reading:<\/strong> <a href=\"https:\/\/sass-lang.com\/documentation\/file.SASS_REFERENCE.html\" rel=\"nofollow noopener\" target=\"_blank\">Official Sass Language Documentation<\/a><\/p>\n<p>This post concludes our Sass series, and we hope you enjoyed it. If you have any questions regarding this subject, don\u2019t hesitate to add them in the comment box below.<\/p>","protected":false},"excerpt":{"rendered":"<p>Today, we\u2019re going to continue our discussion on Sass. This time, we\u2019ll take a practical approach and build an online vCard using Sass along with Compass. The goal is to make the vCard easily adjustable for color and size. We\u2019ll utilize several Sass and Compass features, including Variables, Mixins, Operations, Selector Inheritance, Nested Rules, and&hellip;<\/p>\n","protected":false},"author":113,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3392],"tags":[507,2190],"topic":[4520],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Creating an Interactive Online vCard Using Sass &amp; Compass - Hongkiat<\/title>\n<meta name=\"description\" content=\"Today, we&#039;re going to continue our discussion on Sass. This time, we&#039;ll take a practical approach and build an online vCard using Sass along with Compass.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/sass-compass-vcard\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Creating an Interactive Online vCard Using Sass &amp; Compass\" \/>\n<meta property=\"og:description\" content=\"Today, we&#039;re going to continue our discussion on Sass. This time, we&#039;ll take a practical approach and build an online vCard using Sass along with Compass.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/sass-compass-vcard\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2012-11-14T13:01:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-03T17:14:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/sass-compass-vcard\/sass-vcard.jpg\" \/>\n<meta name=\"author\" content=\"Thoriq Firdaus\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@tfirdaus\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Thoriq Firdaus\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/sass-compass-vcard\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/sass-compass-vcard\\\/\"},\"author\":{\"name\":\"Thoriq Firdaus\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e7948c7a175d211496331e4b6ce55807\"},\"headline\":\"Creating an Interactive Online vCard Using Sass &#038; Compass\",\"datePublished\":\"2012-11-14T13:01:31+00:00\",\"dateModified\":\"2025-04-03T17:14:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/sass-compass-vcard\\\/\"},\"wordCount\":1198,\"commentCount\":11,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/sass-compass-vcard\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/sass-compass-vcard\\\/sass-vcard.jpg\",\"keywords\":[\"CSS\",\"sass\"],\"articleSection\":[\"Coding\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/sass-compass-vcard\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/sass-compass-vcard\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/sass-compass-vcard\\\/\",\"name\":\"Creating an Interactive Online vCard Using Sass & Compass - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/sass-compass-vcard\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/sass-compass-vcard\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/sass-compass-vcard\\\/sass-vcard.jpg\",\"datePublished\":\"2012-11-14T13:01:31+00:00\",\"dateModified\":\"2025-04-03T17:14:23+00:00\",\"description\":\"Today, we're going to continue our discussion on Sass. This time, we'll take a practical approach and build an online vCard using Sass along with Compass.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/sass-compass-vcard\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/sass-compass-vcard\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/sass-compass-vcard\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/sass-compass-vcard\\\/sass-vcard.jpg\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/sass-compass-vcard\\\/sass-vcard.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/sass-compass-vcard\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Creating an Interactive Online vCard Using Sass &#038; Compass\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e7948c7a175d211496331e4b6ce55807\",\"name\":\"Thoriq Firdaus\",\"description\":\"Thoriq is a writer for Hongkiat.com with a passion for web design and development. He is the author of Responsive Web Design by Examples, where he covered his best approaches in developing responsive websites quickly with a framework.\",\"sameAs\":[\"https:\\\/\\\/thoriq.com\",\"https:\\\/\\\/x.com\\\/tfirdaus\"],\"jobTitle\":\"Web Developer\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/thoriq\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Creating an Interactive Online vCard Using Sass & Compass - Hongkiat","description":"Today, we're going to continue our discussion on Sass. This time, we'll take a practical approach and build an online vCard using Sass along with Compass.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hongkiat.com\/blog\/sass-compass-vcard\/","og_locale":"en_US","og_type":"article","og_title":"Creating an Interactive Online vCard Using Sass & Compass","og_description":"Today, we're going to continue our discussion on Sass. This time, we'll take a practical approach and build an online vCard using Sass along with Compass.","og_url":"https:\/\/www.hongkiat.com\/blog\/sass-compass-vcard\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2012-11-14T13:01:31+00:00","article_modified_time":"2025-04-03T17:14:23+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/sass-compass-vcard\/sass-vcard.jpg","type":"","width":"","height":""}],"author":"Thoriq Firdaus","twitter_card":"summary_large_image","twitter_creator":"@tfirdaus","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Thoriq Firdaus","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/sass-compass-vcard\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/sass-compass-vcard\/"},"author":{"name":"Thoriq Firdaus","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e7948c7a175d211496331e4b6ce55807"},"headline":"Creating an Interactive Online vCard Using Sass &#038; Compass","datePublished":"2012-11-14T13:01:31+00:00","dateModified":"2025-04-03T17:14:23+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/sass-compass-vcard\/"},"wordCount":1198,"commentCount":11,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/sass-compass-vcard\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/sass-compass-vcard\/sass-vcard.jpg","keywords":["CSS","sass"],"articleSection":["Coding"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/sass-compass-vcard\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/sass-compass-vcard\/","url":"https:\/\/www.hongkiat.com\/blog\/sass-compass-vcard\/","name":"Creating an Interactive Online vCard Using Sass & Compass - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/sass-compass-vcard\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/sass-compass-vcard\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/sass-compass-vcard\/sass-vcard.jpg","datePublished":"2012-11-14T13:01:31+00:00","dateModified":"2025-04-03T17:14:23+00:00","description":"Today, we're going to continue our discussion on Sass. This time, we'll take a practical approach and build an online vCard using Sass along with Compass.","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/sass-compass-vcard\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/sass-compass-vcard\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/sass-compass-vcard\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/sass-compass-vcard\/sass-vcard.jpg","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/sass-compass-vcard\/sass-vcard.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/sass-compass-vcard\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Creating an Interactive Online vCard Using Sass &#038; Compass"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e7948c7a175d211496331e4b6ce55807","name":"Thoriq Firdaus","description":"Thoriq is a writer for Hongkiat.com with a passion for web design and development. He is the author of Responsive Web Design by Examples, where he covered his best approaches in developing responsive websites quickly with a framework.","sameAs":["https:\/\/thoriq.com","https:\/\/x.com\/tfirdaus"],"jobTitle":"Web Developer","url":"https:\/\/www.hongkiat.com\/blog\/author\/thoriq\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-413","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/15441","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/113"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=15441"}],"version-history":[{"count":3,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/15441\/revisions"}],"predecessor-version":[{"id":73558,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/15441\/revisions\/73558"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=15441"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=15441"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=15441"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=15441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}