{"id":19723,"date":"2018-11-20T12:30:33","date_gmt":"2018-11-20T12:30:33","guid":{"rendered":"https:\/\/www.heartinternet.uk\/blog\/?p=19723"},"modified":"2018-11-20T12:30:33","modified_gmt":"2018-11-20T12:30:33","slug":"16-devtools-tips-and-tricks-every-css-developer-need-to-know","status":"publish","type":"post","link":"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/","title":{"rendered":"16 DevTools tips and tricks every CSS developer needs to know"},"content":{"rendered":"<p>When it comes to debugging the front-end, if you&#8217;re like many developers, you basically live in your browser&#8217;s developer tools. But even after having worked in Chrome&#8217;s developer tools for quite a few years, I still come across tips, tricks, and features that I haven&#8217;t seen before.<\/p>\n<p>In this article, I&#8217;ve compiled a number of CSS-related features and tricks available via developer tools that I think will take your CSS development to a new level. Some of these tips aren&#8217;t specifically only for CSS, but I&#8217;ll present them in a CSS context.<\/p>\n<p>Some are simple tips for workflow and debugging, while others are new features that have rolled out in recent years. Most are based on Chrome&#8217;s DevTools, but I&#8217;ve also included a few Firefox tips.<\/p>\n<h3>Examine CSS for an element that appears via JavaScript<\/h3>\n<p>Finding the CSS for most elements in the DevTools Elements panel isn&#8217;t difficult. In most cases you can just right-click the element, inspect it, then (if necessary) drill down to find it in the Elements panel. Once it&#8217;s selected, the CSS will appear in the Styles panel, ready to edit.<\/p>\n<p>Sometimes an element appears dynamically as a result of some JavaScript-based user action like click or mouseover. The most obvious way to make the element appear is to temporarily alter your JavaScript and\/or CSS to make the element visible by default, so you can deal with it without needing to mimic the user action.<\/p>\n<p>But if you&#8217;re looking for a quick way to make the element visible using just your DevTools, here are the steps to do this:<\/p>\n<ol>\n<li>Open DevTools<\/li>\n<li>Open the Sources panel<\/li>\n<li>Carry out the user action to make the element visible (e.g. mouseover)<\/li>\n<li>Hit F8 (same as &#8220;Pause script execution&#8221; button) while the element is visible<\/li>\n<li>Click the &#8220;Select an element&#8230;&#8221; button in DevTools<\/li>\n<li>Click the element on the page<\/li>\n<\/ol>\n<p>We can test this using <a href=\"https:\/\/getbootstrap.com\/docs\/3.3\/javascript\/#tooltips\">Bootstrap&#8217;s tooltips<\/a>, which only appear when hovering over a link, triggered via JavaScript. Here&#8217;s a demonstration:<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-19725\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/bootstrap-tool-tips-example.gif\" alt=\"Animated GIF showing how to select an element using Bootstrap's tooltips\" width=\"512\" height=\"436\" \/><\/p>\n<p>As you can see at the start of the video, I can&#8217;t initially reach the element to inspect it, because it disappears on mouseout. But if I stop script execution while it&#8217;s visible, it will stay visible so I can inspect it properly. Of course, if it was simply a CSS <code>:hover<\/code> effect, then I could make it appear using the &#8220;Toggle element state&#8221; section of the Styles panel. But in this case, this is probably the best way to grab the styles of an element whose visibility is triggered via JavaScript.<\/p>\n<h3>Search for an element using CSS selectors<\/h3>\n<p>You might know that if you want to search for an element in the Elements panel, you can do this using a find feature (CTRL-F\/CMD-F) that&#8217;s built in. But notice when you view the &#8220;find&#8221; field, it gives you the following instructions:<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-19728\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/search-for-a-css-element.png\" alt=\"Image showing where you can search for an element using CSS selectors\" width=\"650\" height=\"395\" \/><\/p>\n<p>As I&#8217;ve indicated in the screenshot, you can find an element &#8220;by string, selector, or XPath&#8221;. I&#8217;ve used &#8220;string&#8221; many times before but only recently realised I can use a selector for this.<\/p>\n<p>You don&#8217;t have to use a selector that&#8217;s in use in the CSS, it could be any valid CSS selector. The find feature will tell you if your selector matches any elements. This could be useful for finding elements but might also help for testing selectors to see what works.<\/p>\n<p>Below is a demo that uses the selector <code>body&gt;div<\/code> to search and cycle through all the <code>div<\/code> elements on the page that are direct children of the <code>body<\/code> element:<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-19731\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/body-div-seach-example.gif\" alt=\"Animated GIF showing how to search through specific selectors in your CSS\" width=\"650\" height=\"298\" \/><\/p>\n<p>As mentioned, this search can be done with any valid selector, which would be similar to using JavaScript&#8217;s <code>querySelector()<\/code> or <code>querySelectorAll()<\/code> methods.<\/p>\n<h3>Edit the box model directly<\/h3>\n<p>The box model is one of the first things you learn when you start out with CSS. As this is an important aspect of CSS layouts, the DevTools allow you to edit the box model directly.<\/p>\n<p>If you inspect an element on the page, in the right panel click the &#8220;Computed&#8221; panel next to the &#8220;Styles&#8221; panel. This shows you a visual interpretation of the box model for that element, with the values as part of the graphic:<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-19734\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/model-box-example.png\" alt=\"An image showing the visual representation of the box model for that particular element\" width=\"512\" height=\"284\" \/><\/p>\n<p>But maybe you didn&#8217;t know that you can edit any of those values in place by double clicking them:<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-19737\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/model-box-editing-example.gif\" alt=\"Animated GIF showing how you can edit the values of the box model within the representation\" width=\"512\" height=\"310\" \/><\/p>\n<p>Any changes made are reflected on the page in the same way as when you edit the CSS in the Styles panel.<\/p>\n<h3>Increment\/decrement values in the Styles panel<\/h3>\n<p>You are probably already aware that you can edit your CSS in the Styles panel. Just click on a property or value and type in your changes.<\/p>\n<p>But maybe you didn&#8217;t realise that numerical values can be incremented or decremented in different ways.<\/p>\n<ul>\n<li>Up\/Down arrow keys increment\/decrement by 1<\/li>\n<li>ALT+Up\/Down arrow keys increment\/decrement by 0.1<\/li>\n<li>SHIFT+Up\/Down arrow keys increment\/decrement by 10<\/li>\n<li>CTRL+Up\/Down arrow keys increment\/decrement by 100<\/li>\n<\/ul>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-19739\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/incrementing-values-in-the-styles-panel-example.gif\" alt=\"Animated GIF showing how you can increase or decrease the values using the arrow keys\" width=\"648\" height=\"391\" \/><\/p>\n<p>You can also use the Page Up or Page Down buttons instead of the arrow keys.<\/p>\n<h3>Text editor-like features in Sources panel<\/h3>\n<p>You&#8217;re probably more familiar with making edits in the Styles panel than anywhere else. The Sources panel, however, is a highly underrated feature of the DevTools because of how closely it mimics working in a regular code editor or IDE.<\/p>\n<p>Here are some of the useful things you can do in the Source panel (which you can view by opening DevTools and clicking the &#8220;Sources&#8221; tab).<\/p>\n<h4>Make multiple selections with the CTRL key<\/h4>\n<p>If you need to select multiple areas in a single file, you can do this by holding the CTRL key and selecting what you want, even if it&#8217;s not contiguous text.<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-19740\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/multiple-selections-with-ctrl-key.gif\" alt=\"Animated GIF showing how multiple selections can be made by holding the CRTL key\" width=\"650\" height=\"401\" \/><\/p>\n<p>In the above demo I&#8217;m selecting three arbitrary parts of the main.css file in the Sources panel and pasting them back into the document. In addition, you can also type in multiple spots at the same time with multiple carets. Again, use the CTRL key to click in multiple spots to make identical edits to all indicated locations.<\/p>\n<h4>Column selection with ALT key<\/h4>\n<p>In some cases, you might want to select a column of text, which you can&#8217;t normally do by default. Some text editors allow you to use the ALT key to accomplish this, and the same is true in the Sources panel.<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-19743\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/column-selection-with-alt-key.gif\" alt=\"Animated GIF showing how an entire column can be selected by using the ALT key\" width=\"512\" height=\"316\" \/><\/p>\n<h3>Search by CSS selector with CTRL-SHIFT-O<\/h3>\n<p>With a file open in the Sources panel, press CTRL-SHIFT-O on your keyboard to open up the &#8220;Goto Anything&#8221; box, which is a well-known feature in Sublime Text Editor.<\/p>\n<p>After hitting CTRL-SHIFT-O, you can type a CSS selector that you want to find in the file, and the DevTools will give you options to choose to jump to a specific part of the file.<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-19746\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/search-with-css-selector-shortcut.gif\" alt=\"Animated GIF showing how to find a specific CSS selector in the file\" width=\"650\" height=\"401\" \/><\/p>\n<h3>Responsive design features in Chrome and Firefox<\/h3>\n<p>You&#8217;ve probably seen one of those websites that lets you test the responsiveness of your layout right in the browser with a few clicks. Well, you can do the same thing with Chrome&#8217;s Device Mode.<\/p>\n<p>Just open the DevTools and click the &#8220;Toggle device toolbar&#8221; button in the top-left area of the DevTools (CTRL-SHIFT-M will also do it):<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-19749\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/testing-responsive-design.gif\" alt=\"Animated GIF showing how to test the responsiveness of a site in Chrome's Device Mode\" width=\"650\" height=\"440\" \/><\/p>\n<p>As you can see, the device toolbar has multiple options to change the view according to device size and device type, and you can even make those changes manually by adjusting the width and height numbers or by dragging the handles in the viewport area.<\/p>\n<p>Firefox has a similar feature with the added &#8220;@media rules&#8221; panel that allows you to click on a breakpoint from the site&#8217;s stylesheet. You can see me using this on one of my websites in the demo below.<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-19750\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/firefox-responsive-design-test.gif\" alt=\"Animated GIF showing how to test the responsiveness of a site in Firefox\" width=\"650\" height=\"473\" \/><\/p>\n<h3>Colour features in DevTools<\/h3>\n<p>Dealing with colour values in CSS is a constant. DevTools makes it so much easier to edit, test, and otherwise fiddle with colour values. Here are some things you can do.<\/p>\n<h4>Contrast ratio<\/h4>\n<p>First, there are the accessibility features. When you see a colour value in the Styles panel, you can click the swatch next to the colour value to open the colour picker. Inside the colour picker, you&#8217;ll see a contrast ratio option that indicates whether your choice of text colour has an accessible contrast in relation to the background.<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-19751\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/css-contrast-ratio.gif\" alt=\"Animated GIF showing the accessible contrast for a particular colour\" width=\"554\" height=\"424\" \/><\/p>\n<p>As you can see in the above demo, the colour picker shows a curved white line in the colour spectrum. This line indicates where the minimum acceptable contrast ratio begins and ends. When I move the colour value above the white line, the contrast ratio value loses its green checkmark, indicating poor contrast.<\/p>\n<h4>Colour palettes<\/h4>\n<p>In addition to the accessibility features, you also have access to different colour palettes, including a Material Design palette and one associated with the currently viewed page.<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-19752\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/css-colour-palettes.gif\" alt=\"Animated GIF showing a colour palette for a particular colour\" width=\"553\" height=\"422\" \/><\/p>\n<h4>Toggling colour value syntax<\/h4>\n<p>Finally, one little-known tidbit on viewing colour values in DevTools is the ability to switch the syntax of a specific colour value. By default, the Styles panel will show the syntax for the colour as it was written in the CSS. But the DevTools let you toggle between hex, RGBA, an HSLA by\u00a0 holding the shift key and clicking the swatch next to the colour value:<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-19753\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/toggling-colour-value-syntax.gif\" alt=\"Animated GIF showing how you can toggle the syntax of a colour value\" width=\"553\" height=\"421\" \/><\/p>\n<h3>Editing CSS shadows<\/h3>\n<p>Text shadows and box shadows can be tedious to try to write out in your CSS by hand. The syntax is easy to forget and the two kinds of shadows have slightly differing syntax.<\/p>\n<p>Conveniently, the Chrome DevTools allow you to add a text shadow or box shadow using a visual editor.<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-19754\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/editing-css-shadows.gif\" alt=\"Animated GIF showing how to edit a shadow effect in Chrome DevTools\" width=\"632\" height=\"734\" \/><\/p>\n<p>As shown in the demo, you can add a box shadow or text shadow to any element using the option bar that appears at the bottom right corner of any style rule in the Styles panel. After the shadow is added, you can modify the shadow&#8217;s various properties using a visual editor. This editor can then be brought up again for any existing shadow using the &#8220;Open shadow editor&#8221; option next to the property name.<\/p>\n<h3>Grid Layout Inspector in Firefox<\/h3>\n<p>Now that Grid Layout is supported in the majority of in-use browsers, more and more developers are using it as their default layout method. Firefox&#8217;s developer tools now feature a &#8220;Grid&#8221; section in the &#8220;Layout&#8221; tab of the developer tools.<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-19760\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/grid-layout-inspector-in-firefox.gif\" alt=\"Animated GIF showing how to use the Grid Layout Inspector in Firefox\" width=\"650\" height=\"419\" \/><\/p>\n<p>This feature allows you to enable an overlay grid that helps to visualise the different parts of your grid layout. You can also display line numbers, area names, and you can choose to extend the grid lines infinitely if that helps you. In the example demo, I&#8217;m using this example site by Jen Simmons, which is responsive, so you can see the benefits of the overlay when the layout changes for different sized viewports.<\/p>\n<h3>CSS filters editor in Firefox<\/h3>\n<p>Filters are another feature that now have near-universal support in both mobile and desktop browsers. Once again, Firefox offers a handy little tool to help you edit your filter values.<\/p>\n<p>Once you&#8217;ve got a filter in place in your code (tip: you can start with <code>filter: none<\/code> if you don&#8217;t know the syntax for an actual filter from memory), you&#8217;ll notice a gray and white swatch next to the filter&#8217;s value. Click that swatch to open the filter editor.<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-19757\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/css-filter-editor-in-firefox.gif\" alt=\"Animaged GIF showing how to use the Firefox CSS filters editor\" width=\"512\" height=\"229\" \/><\/p>\n<p>You can add multiple filters to a single value, delete individual filter values, and you can drag and drop individual filters to rearrange the order in which they&#8217;re applied.<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-19762\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/css-multiple-filters-in-firefox.gif\" alt=\"Aniamted GIF showing how to drag and drop individual filters on a single element\" width=\"650\" height=\"288\" \/><\/p>\n<h3>Edit CSS animations in Chrome\u2019s Styles panel<\/h3>\n<p>Static elements are fairly straightforward to edit in the Styles panel in Chrome&#8217;s DevTools. But what about animations created using the <code>animation<\/code> property and the <code>@keyframes<\/code> at-rule?<\/p>\n<p>DevTools has two ways you can edit animations. First, when you inspect an element or select it in the Elements panel, all the element&#8217;s styles appear in the Styles panel \u2013 including the defined <code>@keyframes<\/code>. In the following demo, I&#8217;m selecting an animated element, then adjusting and fiddling with some of the keyframe settings.<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-19763\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/editing-animation-keyframe-settings-in-chrome.gif\" alt=\"Animated GIF showing how to edit CSS animations in Chrome's Styles panel\" width=\"650\" height=\"384\" \/><\/p>\n<p>But that&#8217;s not all. Chrome&#8217;s DevTools also features an Animation panel that allows you to edit an animation and its various parts using a visual timeline. You can access this feature by going into the &#8220;Customize and control DevTools&#8221; option (the three dots), choosing &#8220;More tools&#8221;, and selecting &#8220;Animations&#8221;.<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-19764\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/editting-css-animations-in-chrome-style-panel.gif\" alt=\"Animated GIF showing the Animations panel in Chrome's DevTools\" width=\"512\" height=\"302\" \/><\/p>\n<p>As shown above, you can edit each individual animated element&#8217;s timeline, then once your edits are complete, you can scrub through the animation to see the changes live on the page. This is a cool feature for designing and debugging complex CSS animations!<\/p>\n<h3>View unused CSS in DevTools<\/h3>\n<p>Lately there&#8217;s been an influx of tools that help you track down parts of your CSS not used on specific pages. This way you can choose to either remove them altogether or load them only when necessary. This will have clear performance advantages.<\/p>\n<p>Chrome allows you to view unused CSS right inside the DevTools by means of the &#8220;Coverage&#8221; panel. This panel can be opened by clicking the &#8220;Customize and control DevTools&#8221; (three dots) option, then &#8220;More tools&#8221;, then &#8220;Coverage&#8221;.<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-19767\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/view-unused-css-in-dev-tools.gif\" alt=\"Animated GIF showing how to customise your menu on Chrome's DevTools\" width=\"650\" height=\"306\" \/><\/p>\n<p>As shown in the demo, once you&#8217;re in the Coverage panel, you can select a source file to open it in the &#8220;Sources&#8221; panel. When the file opens in Sources, you&#8217;ll notice green and red indicator lines next to each style rule in the CSS file. These indicate if that part of the CSS was used on the current page.<\/p>\n<h3>Conclusion<\/h3>\n<p>Your browser&#8217;s developer tools are a treasure trove of CSS editing and debugging features. And when you combine these suggestions with a feature in Chrome like Workspaces (which allows you to save changes made in DevTools to a local file), the process of debugging becomes even more complete.<\/p>\n<p>I hope these tips and suggestions will enhance your CSS editing and debugging abilities in your future projects.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Debugging CSS via your brower&#8217;s DevTools? Of course you are, so check out these tips and tricks that will make the debugging process that little bit easier.<\/p>\n","protected":false},"author":2,"featured_media":19772,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,24],"tags":[],"class_list":{"0":"post-19723","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-guest-posts","8":"category-web-design"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>16 DevTools tips and tricks every CSS developer needs to know - Heart Internet<\/title>\n<meta name=\"description\" content=\"Debugging CSS? These DevTools tips and tricks will help make sure the process is as quick and as easy as possible\" \/>\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.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"16 DevTools tips and tricks every CSS developer needs to know - Heart Internet\" \/>\n<meta property=\"og:description\" content=\"Debugging CSS? These DevTools tips and tricks will help make sure the process is as quick and as easy as possible\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/\" \/>\n<meta property=\"og:site_name\" content=\"Heart Internet\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/heartinternet\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-11-20T12:30:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/10\/beetles-on-a-leaf.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1100\" \/>\n\t<meta property=\"og:image:height\" content=\"717\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Eliot Chambers-Ostler\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@heartinternet\" \/>\n<meta name=\"twitter:site\" content=\"@heartinternet\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Eliot Chambers-Ostler\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/\"},\"author\":{\"name\":\"Eliot Chambers-Ostler\",\"@id\":\"https:\/\/heartblog.victory.digital\/#\/schema\/person\/58ed7f27cc0f3ab6e69135742a5eee28\"},\"headline\":\"16 DevTools tips and tricks every CSS developer needs to know\",\"datePublished\":\"2018-11-20T12:30:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/\"},\"wordCount\":2261,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/heartblog.victory.digital\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/10\/beetles-on-a-leaf.jpg\",\"articleSection\":[\"Guest Posts\",\"Web Design\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/\",\"url\":\"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/\",\"name\":\"16 DevTools tips and tricks every CSS developer needs to know - Heart Internet\",\"isPartOf\":{\"@id\":\"https:\/\/heartblog.victory.digital\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/10\/beetles-on-a-leaf.jpg\",\"datePublished\":\"2018-11-20T12:30:33+00:00\",\"description\":\"Debugging CSS? These DevTools tips and tricks will help make sure the process is as quick and as easy as possible\",\"breadcrumb\":{\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/#primaryimage\",\"url\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/10\/beetles-on-a-leaf.jpg\",\"contentUrl\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/10\/beetles-on-a-leaf.jpg\",\"width\":1100,\"height\":717},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.heartinternet.uk\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"16 DevTools tips and tricks every CSS developer needs to know\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/heartblog.victory.digital\/#website\",\"url\":\"https:\/\/heartblog.victory.digital\/\",\"name\":\"Heart Internet\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/heartblog.victory.digital\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/heartblog.victory.digital\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/heartblog.victory.digital\/#organization\",\"name\":\"Heart Internet\",\"url\":\"https:\/\/heartblog.victory.digital\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/heartblog.victory.digital\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/02\/HeartInternet_Logo_Colour.webp\",\"contentUrl\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/02\/HeartInternet_Logo_Colour.webp\",\"width\":992,\"height\":252,\"caption\":\"Heart Internet\"},\"image\":{\"@id\":\"https:\/\/heartblog.victory.digital\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/heartinternet\/\",\"https:\/\/x.com\/heartinternet\",\"https:\/\/www.linkedin.com\/company\/heart-internet-ltd\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/heartblog.victory.digital\/#\/schema\/person\/58ed7f27cc0f3ab6e69135742a5eee28\",\"name\":\"Eliot Chambers-Ostler\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/heartblog.victory.digital\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/08\/cropped-Eliot-96x96.jpg\",\"contentUrl\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/08\/cropped-Eliot-96x96.jpg\",\"caption\":\"Eliot Chambers-Ostler\"},\"url\":\"https:\/\/www.heartinternet.uk\/blog\/author\/eliot-chambers-ostler\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"16 DevTools tips and tricks every CSS developer needs to know - Heart Internet","description":"Debugging CSS? These DevTools tips and tricks will help make sure the process is as quick and as easy as possible","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.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/","og_locale":"en_GB","og_type":"article","og_title":"16 DevTools tips and tricks every CSS developer needs to know - Heart Internet","og_description":"Debugging CSS? These DevTools tips and tricks will help make sure the process is as quick and as easy as possible","og_url":"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/","og_site_name":"Heart Internet","article_publisher":"https:\/\/www.facebook.com\/heartinternet\/","article_published_time":"2018-11-20T12:30:33+00:00","og_image":[{"width":1100,"height":717,"url":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/10\/beetles-on-a-leaf.jpg","type":"image\/jpeg"}],"author":"Eliot Chambers-Ostler","twitter_card":"summary_large_image","twitter_creator":"@heartinternet","twitter_site":"@heartinternet","twitter_misc":{"Written by":"Eliot Chambers-Ostler","Estimated reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/#article","isPartOf":{"@id":"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/"},"author":{"name":"Eliot Chambers-Ostler","@id":"https:\/\/heartblog.victory.digital\/#\/schema\/person\/58ed7f27cc0f3ab6e69135742a5eee28"},"headline":"16 DevTools tips and tricks every CSS developer needs to know","datePublished":"2018-11-20T12:30:33+00:00","mainEntityOfPage":{"@id":"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/"},"wordCount":2261,"commentCount":0,"publisher":{"@id":"https:\/\/heartblog.victory.digital\/#organization"},"image":{"@id":"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/#primaryimage"},"thumbnailUrl":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/10\/beetles-on-a-leaf.jpg","articleSection":["Guest Posts","Web Design"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/","url":"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/","name":"16 DevTools tips and tricks every CSS developer needs to know - Heart Internet","isPartOf":{"@id":"https:\/\/heartblog.victory.digital\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/#primaryimage"},"image":{"@id":"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/#primaryimage"},"thumbnailUrl":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/10\/beetles-on-a-leaf.jpg","datePublished":"2018-11-20T12:30:33+00:00","description":"Debugging CSS? These DevTools tips and tricks will help make sure the process is as quick and as easy as possible","breadcrumb":{"@id":"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/#primaryimage","url":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/10\/beetles-on-a-leaf.jpg","contentUrl":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/10\/beetles-on-a-leaf.jpg","width":1100,"height":717},{"@type":"BreadcrumbList","@id":"https:\/\/www.heartinternet.uk\/blog\/16-devtools-tips-and-tricks-every-css-developer-need-to-know\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.heartinternet.uk\/blog\/"},{"@type":"ListItem","position":2,"name":"16 DevTools tips and tricks every CSS developer needs to know"}]},{"@type":"WebSite","@id":"https:\/\/heartblog.victory.digital\/#website","url":"https:\/\/heartblog.victory.digital\/","name":"Heart Internet","description":"","publisher":{"@id":"https:\/\/heartblog.victory.digital\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/heartblog.victory.digital\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/heartblog.victory.digital\/#organization","name":"Heart Internet","url":"https:\/\/heartblog.victory.digital\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/heartblog.victory.digital\/#\/schema\/logo\/image\/","url":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/02\/HeartInternet_Logo_Colour.webp","contentUrl":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/02\/HeartInternet_Logo_Colour.webp","width":992,"height":252,"caption":"Heart Internet"},"image":{"@id":"https:\/\/heartblog.victory.digital\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/heartinternet\/","https:\/\/x.com\/heartinternet","https:\/\/www.linkedin.com\/company\/heart-internet-ltd"]},{"@type":"Person","@id":"https:\/\/heartblog.victory.digital\/#\/schema\/person\/58ed7f27cc0f3ab6e69135742a5eee28","name":"Eliot Chambers-Ostler","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/heartblog.victory.digital\/#\/schema\/person\/image\/","url":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/08\/cropped-Eliot-96x96.jpg","contentUrl":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/08\/cropped-Eliot-96x96.jpg","caption":"Eliot Chambers-Ostler"},"url":"https:\/\/www.heartinternet.uk\/blog\/author\/eliot-chambers-ostler\/"}]}},"_links":{"self":[{"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/posts\/19723","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/comments?post=19723"}],"version-history":[{"count":0,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/posts\/19723\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/media\/19772"}],"wp:attachment":[{"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/media?parent=19723"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/categories?post=19723"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/tags?post=19723"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}