Hacking a bit of dev.to with CSS
Tags: html, css, productivity
Published: 2018-06-07 00:39:13

---
title: Hacking a bit of dev.to with CSS
published: true
description: Ever felt you can hack dev.to itself?
tags: html, css, productivity
---

# The problem: No sticky save for lazy developers

When you are browsing this website, you get the titles like this, sometimes there are description, images and tags. 

![](http://i.imgur.com/O8GSdWl.png)

So you have two options here, either open to read it, or save it for later. Sometimes the titles are tricky as this post you are reading right now. Maybe you thought it was something very interesting, but it was actually a trap to get views/likes etc. Let's open the post to see what's inside.

![](http://i.imgur.com/hznbrJx.png)

Great! It's a great article to read with lots of valuable information. But wait, you got to hurry up with your train so you have decided to save the post. 

![](http://i.imgur.com/JDOTViI.png)

The save button is either on the previous page or at the bottom of current post, no save button on the side of the post where you could easily just save it for later. Maybe you can use bookmarks with ctrl + d, but that'd be so boring.

We can either wait for the team to build one for us or we can build one ourselves. Won't it be great to fiddle with some little stuff sometimes?

# The Solution: Fiddling with CSS

Okay, let's extract the selector first. I'll right click, select "Inspect Element" and it will be highlighted like this.
![](http://i.imgur.com/IRkVCy8.png)

Now we know what to break. Let's make some css code for the selector, 

```css
#article-reaction-actions {
    position: fixed; /* This will make it floating around */
    z-index: 1000000; /* Just to make sure it's on top of everything */
    bottom: 0; /* So it stays sticky to bottom of my screen */
    background: white; /* Well it's transparent otherwise */
    width: 880px; /* The size of the parent container */
}
```

I am not going to discuss what each letter of the above snippet does. I'm too lazy to do that right now.

![](https://i.imgur.com/9EfP2Qk.png)

To apply the style, I'll use [Stylish](https://chrome.google.com/webstore/detail/stylish-custom-themes-for/fjnbnpbmkenffdnngjfgmeleoegfcffe), which is a chrome extension. There are [firefox](https://addons.mozilla.org/en-US/firefox/addon/stylish/) and [safari](https://safari-extensions.apple.com/details/?id=com.sobolev.stylish-5555L95H45) version too.

Let's create a new style. when I am reading this post, I will install the chrome extension, come back to this post, and then click the icon.
![](http://i.imgur.com/qZYYVs3.png)

Then I'll use the above snippets code, enter a nice name and save it.
![](http://i.imgur.com/cHzLabj.png)

Great, now when I refresh the page, I'll see this,
![](https://media.giphy.com/media/2UwXvG8rdZ4TbA6qq0/giphy.gif)

Nice, isn't it? I can use this to read first few lines and decide to save or heart it without scrolling to end.

PS: 
- This was just to relieve my boredom, but I use Stylish for many different websites. I also use Tampermonkey to fiddle with the JS if needed. 
- Please don't make a change on website or create a chrome extension just for this post. This is no big deal.
- Sorry for using posts on images without permission :D, it's dev.to, so I guess it won't hurt.