{"id":19991,"date":"2014-05-08T21:01:45","date_gmt":"2014-05-08T13:01:45","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=19991"},"modified":"2025-04-04T01:45:37","modified_gmt":"2025-04-03T17:45:37","slug":"combine-media-queries","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/combine-media-queries\/","title":{"rendered":"How to Streamline Your CSS by Combining Duplicate Media Queries"},"content":{"rendered":"<p>Today, numerous frameworks like <a href=\"https:\/\/www.hongkiat.com\/blog\/tag\/bootstrap\/\">Bootstrap<\/a> and <a href=\"https:\/\/www.hongkiat.com\/blog\/a-look-into-foundation-4-responsive-framework\/\">Foundation<\/a> help you build responsive websites quickly. They include a variety of website components, plugins, and loads of predefined style rules, along with CSS3 <a href=\"https:\/\/www.hongkiat.com\/blog\/css-retina-display\/\">media queries<\/a> for crafting a responsive grid.<\/p>\n<p>However, a common challenge with these frameworks is that media queries are often scattered, declared within <a href=\"https:\/\/www.hongkiat.com\/blog\/less-tips-tools\/\" rel=\"nofollow noopener\" target=\"_blank\">Mixins<\/a> or functions, leading to <strong>multiple duplicated media queries throughout your code<\/strong>.<\/p>\n<p>Imagine if we could eliminate these duplicates and <strong>combine them into a single, efficient CSS rule<\/strong>. Interested? Follow this guide to learn how.<\/p>\n<div class=\"ref-block ref-block--post\" id=\"ref-post-1\">\n\t\t\t\t\t<a href=\"https:\/\/www.hongkiat.com\/blog\/jquery-remove-modules\/\" class=\"ref-block__link\" title=\"Read More: How to Remove Unnecessary jQuery Modules\" rel=\"bookmark\"><span class=\"screen-reader-text\">How to Remove Unnecessary jQuery Modules<\/span><\/a>\n<div class=\"ref-block__thumbnail img-thumb img-thumb--jumbo\" data-img='{ \"src\" : \"https:\/\/assets.hongkiat.com\/uploads\/thumbs\/250x160\/jquery-remove-modules.jpg\" }'>\n\t\t\t\t\t\t\t<noscript>\n<style>.no-js #ref-block-post-17540 .ref-block__thumbnail { background-image: url(\"https:\/\/assets.hongkiat.com\/uploads\/thumbs\/250x160\/jquery-remove-modules.jpg\"); }<\/style>\n<\/noscript>\n\t\t\t\t\t\t<\/div>\n<div class=\"ref-block__summary\">\n<h4 class=\"ref-title\">How to Remove Unnecessary jQuery Modules<\/h4>\n<p class=\"ref-description\">\n\t\t\t\t\t\tjQuery is undoubtedly the most popular JavaScript library. Almost every website on the planet uses it. Due to...\t\t\t\t\t\t<span>Read more<\/span><\/p>\n<\/div>\n<\/div>\n<h2>Set Up Your Environment<\/h2>\n<p>This process requires <a href=\"https:\/\/gruntjs.com\/\" rel=\"nofollow noopener\" target=\"_blank\">Grunt<\/a> along with Grunt CLI, a <a href=\"https:\/\/www.hongkiat.com\/blog\/node-js-server-side-javascript\/\" rel=\"nofollow noopener\" target=\"_blank\">Node.js<\/a> package for task automation. Open your Terminal or Command Prompt and enter the following command to install Grunt CLI:<\/p>\n<pre>\r\n npm install -g grunt-cli\r\n<\/pre>\n<p>Once installed, check that Grunt is functioning by typing <code>grunt --version<\/code>. This should display the version of Grunt installed on your system.<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/combine-media-queries\/grunt-test.jpg\" alt=\"Testing Grunt installation on a command line interface\"><\/figure>\n<p>If you encounter an error stating the command is not found, see our guide on <a href=\"https:\/\/www.hongkiat.com\/blog\/grunt-command-not-found\/\" rel=\"nofollow noopener\" target=\"_blank\">how to resolve the \u201cCommand Not Found\u201d error with Grunt<\/a>.<\/p>\n<h3>Setting Up Grunt for Your Project<\/h3>\n<p>In your project folder, run the following command to create a <code>Gruntfile.js<\/code>. This file will define and register your Grunt tasks:<\/p>\n<pre>\r\n touch Gruntfile.js\r\n<\/pre>\n<p>Next, install the necessary Grunt module and a plugin named <code>grunt-combine-media-queries<\/code> (cmq) to help combine matching media queries. Enter these commands:<\/p>\n<pre>\r\n npm install grunt --save-dev\r\n npm install grunt-combine-media-queries --save-dev\r\n<\/pre>\n<p>After installation, your project directory will include a new folder called <code>node_modules<\/code>, containing the newly added modules.<\/p>\n<h2>Setting Up and Configuring Your Task<\/h2>\n<p>Begin by opening your <code>Gruntfile.js<\/code> and inserting the following configuration:<\/p>\n<pre>\r\nmodule.exports = function(grunt) {\r\n  grunt.initConfig({\r\n    cmq: {\r\n      options: {\r\n        log: false\r\n      },\r\n      your_target: {\r\n        files: {\r\n          'output': ['build\/*.css']\r\n        }\r\n      }\r\n    }\r\n  });\r\n  grunt.loadNpmTasks('grunt-combine-media-queries');\r\n  grunt.registerTask('default', 'cmq');\r\n};\r\n<\/pre>\n<p>The code snippet above sets up the <code>cmq<\/code> task within your Grunt configuration. It includes two key parameters, <code>log<\/code> and <code>files<\/code>:<\/p>\n<p>The <code>log<\/code> parameter is a boolean. Setting it to <code>true<\/code> will generate a log file detailing the media queries processed. This is useful for debugging and ensuring that the right queries are being combined.<\/p>\n<p>The <code>files<\/code> parameter designates the source and destination for your CSS files. In the example provided, it targets CSS files in the <code>build<\/code> folder and directs the combined output to the <code>output<\/code> folder. Adjust these paths to match your project\u2019s structure as needed.<\/p>\n<h2>Executing the Task<\/h2>\n<p>With everything set up-including the installation of Grunt CLI, the Grunt module, and the media query combining plugin-it\u2019s now time to run the task.<\/p>\n<p>Below is an example of a CSS file containing several duplicated media queries:<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/combine-media-queries\/duplicated.jpg\" alt=\"Example of duplicated media queries in a CSS file\" width=\"500\" height=\"320\"><\/figure>\n<p>To execute the task, open your Terminal, make sure you\u2019re in your project directory, and simply type <code>grunt<\/code> as shown below:<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/combine-media-queries\/grunt-success.jpg\" alt=\"Terminal showing successful execution of Grunt\" width=\"500\" height=\"120\"><\/figure>\n<p>Once completed, you can compare the original and the output file. Here\u2019s how they look:<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/combine-media-queries\/output.jpg\" alt=\"Comparison between the original and output CSS files after combining media queries\" width=\"500\" height=\"320\"><\/figure>\n<h2>Additional Resources<\/h2>\n<ul>\n<li><a href=\"https:\/\/gruntjs.com\/getting-started\" rel=\"nofollow noopener\" target=\"_blank\">Getting Started with GruntJS<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/buildingblocks\/grunt-combine-media-queries\" rel=\"nofollow noopener\" target=\"_blank\">Grunt Combine Media Queries Repository<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Today, numerous frameworks like Bootstrap and Foundation help you build responsive websites quickly. They include a variety of website components, plugins, and loads of predefined style rules, along with CSS3 media queries for crafting a responsive grid. However, a common challenge with these frameworks is that media queries are often scattered, declared within Mixins or&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":[352],"tags":[507,4501],"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.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Streamline Your CSS by Combining Duplicate Media Queries - Hongkiat<\/title>\n<meta name=\"description\" content=\"Today, numerous frameworks like Bootstrap and Foundation help you build responsive websites quickly. They include a variety of website components,\" \/>\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\/combine-media-queries\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Streamline Your CSS by Combining Duplicate Media Queries\" \/>\n<meta property=\"og:description\" content=\"Today, numerous frameworks like Bootstrap and Foundation help you build responsive websites quickly. They include a variety of website components,\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/combine-media-queries\/\" \/>\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=\"2014-05-08T13:01:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-03T17:45:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/combine-media-queries\/grunt-test.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=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/combine-media-queries\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/combine-media-queries\\\/\"},\"author\":{\"name\":\"Thoriq Firdaus\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e7948c7a175d211496331e4b6ce55807\"},\"headline\":\"How to Streamline Your CSS by Combining Duplicate Media Queries\",\"datePublished\":\"2014-05-08T13:01:45+00:00\",\"dateModified\":\"2025-04-03T17:45:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/combine-media-queries\\\/\"},\"wordCount\":435,\"commentCount\":5,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/combine-media-queries\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/combine-media-queries\\\/grunt-test.jpg\",\"keywords\":[\"CSS\",\"CSS Tutorials\"],\"articleSection\":[\"Web Design\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/combine-media-queries\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/combine-media-queries\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/combine-media-queries\\\/\",\"name\":\"How to Streamline Your CSS by Combining Duplicate Media Queries - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/combine-media-queries\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/combine-media-queries\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/combine-media-queries\\\/grunt-test.jpg\",\"datePublished\":\"2014-05-08T13:01:45+00:00\",\"dateModified\":\"2025-04-03T17:45:37+00:00\",\"description\":\"Today, numerous frameworks like Bootstrap and Foundation help you build responsive websites quickly. They include a variety of website components,\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/combine-media-queries\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/combine-media-queries\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/combine-media-queries\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/combine-media-queries\\\/grunt-test.jpg\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/combine-media-queries\\\/grunt-test.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/combine-media-queries\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Streamline Your CSS by Combining Duplicate Media Queries\"}]},{\"@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":"How to Streamline Your CSS by Combining Duplicate Media Queries - Hongkiat","description":"Today, numerous frameworks like Bootstrap and Foundation help you build responsive websites quickly. They include a variety of website components,","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\/combine-media-queries\/","og_locale":"en_US","og_type":"article","og_title":"How to Streamline Your CSS by Combining Duplicate Media Queries","og_description":"Today, numerous frameworks like Bootstrap and Foundation help you build responsive websites quickly. They include a variety of website components,","og_url":"https:\/\/www.hongkiat.com\/blog\/combine-media-queries\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2014-05-08T13:01:45+00:00","article_modified_time":"2025-04-03T17:45:37+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/combine-media-queries\/grunt-test.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":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/combine-media-queries\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/combine-media-queries\/"},"author":{"name":"Thoriq Firdaus","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e7948c7a175d211496331e4b6ce55807"},"headline":"How to Streamline Your CSS by Combining Duplicate Media Queries","datePublished":"2014-05-08T13:01:45+00:00","dateModified":"2025-04-03T17:45:37+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/combine-media-queries\/"},"wordCount":435,"commentCount":5,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/combine-media-queries\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/combine-media-queries\/grunt-test.jpg","keywords":["CSS","CSS Tutorials"],"articleSection":["Web Design"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/combine-media-queries\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/combine-media-queries\/","url":"https:\/\/www.hongkiat.com\/blog\/combine-media-queries\/","name":"How to Streamline Your CSS by Combining Duplicate Media Queries - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/combine-media-queries\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/combine-media-queries\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/combine-media-queries\/grunt-test.jpg","datePublished":"2014-05-08T13:01:45+00:00","dateModified":"2025-04-03T17:45:37+00:00","description":"Today, numerous frameworks like Bootstrap and Foundation help you build responsive websites quickly. They include a variety of website components,","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/combine-media-queries\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/combine-media-queries\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/combine-media-queries\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/combine-media-queries\/grunt-test.jpg","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/combine-media-queries\/grunt-test.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/combine-media-queries\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Streamline Your CSS by Combining Duplicate Media Queries"}]},{"@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-5cr","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/19991","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=19991"}],"version-history":[{"count":3,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/19991\/revisions"}],"predecessor-version":[{"id":73685,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/19991\/revisions\/73685"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=19991"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=19991"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=19991"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=19991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}