r/reddithax • • Aug 31 '17

"Hexagonal thumbnails" customization

My realization of "Hexagonal thumbnails" from r/NMSCoordinateExchange/ (inc. fixes only for Naut theme)

/* Addon: Hexagonal Thumbnails */
.thumbnail.default, .thumbnail.self, .thumbnail.nsfw, .thumbnail.image,     .thumbnail.spoiler, .thumbnail[data-href-url*="reddit.com"] {
	position: relative;
	width: 56px;
	height: 32.33px;
	max-height: 32.33px;
	/* background-clip: content-box; */
	/* background-position: center; */
}

	.thumbnail.default::before, .thumbnail.self::before,     .thumbnail.nsfw::before, .thumbnail.image::before,     .thumbnail.spoiler::before, .thumbnail[data-href-url*="reddit.com"]    ::before,
	.thumbnail.default::after, .thumbnail.self::after, .thumbnail.nsfw::after,     .thumbnail.image::after, .thumbnail.spoiler::after, .thumbnail    [data-href-url*="reddit.com"]::after {
		content: "";
		position: absolute;
		width: 0;
		border-left: 28px solid transparent;
		border-right: 28px solid transparent;
	}

	.thumbnail.default::before, .thumbnail.self::before,     .thumbnail.nsfw::before, .thumbnail.image::before,     .thumbnail.spoiler::before, .thumbnail[data-href-url*="reddit.com"]    ::before {
		bottom: 100%;
		border-bottom: 16.17px solid;
	}

	.thumbnail.default::after, .thumbnail.self::after, .thumbnail.nsfw::after,     .thumbnail.image::after, .thumbnail.spoiler::after, .thumbnail    [data-href-url*="reddit.com"]::after {
		top: 100%;
		width: 0;
		border-top: 16.17px solid;
	}

	/* Misc. Fixes /Naut/ Thumbnails */
	.thumbnail.default, .thumbnail.self, .thumbnail.nsfw, .thumbnail.image,     .thumbnail.spoiler, .thumbnail[data-href-url*="reddit.com"] {
		border-radius:0px;
		overflow:visible;
		margin: 16.17px 28px 0 12px;
	}

	/* Color and position Fixes /Naut/ Thumbnails */
	.thumbnail.default {background-color: #d2dbe0; background-position-y: calc    (-48px - 12px);}
		.thumbnail.default::before {border-bottom-color: #d2dbe0}
		.thumbnail.default::after {border-top-color: #d2dbe0}

	.thumbnail.self {background-color: #d2dbe0; background-position-y: calc    (-48px - 12px);}
		.thumbnail.self::before {border-bottom-color: #d2dbe0}
		.thumbnail.self::after {border-top-color: #d2dbe0}

	.thumbnail.image {background-color: #d2dbe0; background-position-y: calc    (-48px - 12px);}
		.thumbnail.image::before {border-bottom-color: #d2dbe0}
		.thumbnail.image::after {border-top-color: #d2dbe0}

	.thumbnail.nsfw {background-color: #e85881; background-position-y: calc    (-104px - 12px);}
		.thumbnail.nsfw::before {border-bottom-color: #e85881}
		.thumbnail.nsfw::after {border-top-color: #e85881}

	.thumbnail[data-href-url*="reddit.com"] {background-color: #24a0ed;     background-position-y: calc(-104px - 12px);}
		.thumbnail[data-href-url*="reddit.com"]::before {border-bottom-color:     #24a0ed}
		.thumbnail[data-href-url*="reddit.com"]::after {border-top-color:     #24a0ed}

	.stickied .thumbnail {background-color: #2db747}
		.stickied .thumbnail::before {border-bottom-color: #2db747}
		.stickied .thumbnail::after {border-top-color: #2db747}

	.thumbnail.spoiler {background-color: #F44336; background-position-y: calc    (-148px - 12px);}
		.thumbnail.spoiler::before {border-bottom-color: #F44336}
		.thumbnail.spoiler::after {border-top-color: #F44336}



	/* RES Fixes /Naut/ Nightmode */
	.res-nightmode .thumbnail.default {background-color: #d2dbe0;     background-position-y: calc(-48px - 12px);}
		.res-nightmode .thumbnail.default::before {border-bottom-color:     #d2dbe0}
		.res-nightmode .thumbnail.default::after {border-top-color: #d2dbe0}

	.res-nightmode .thumbnail.self {background-color: #d2dbe0;     background-position-y: calc(-48px - 12px);}
		.res-nightmode .thumbnail.self::before {border-bottom-color: #d2dbe0}
		.res-nightmode .thumbnail.self::after {border-top-color: #d2dbe0}

	.res-nightmode .stickied .thumbnail {background-color: #2db747}
		.res-nightmode .stickied .thumbnail::before {border-bottom-color:     #2db747}
		.res-nightmode .stickied .thumbnail::after {border-top-color: #2db747}


	/* Misc. Fixes /Naut/ Link Flairs */
	.linkflair-mod .thumbnail.default, .linkflair-mod .thumbnail.self     {background-color: #27b062; background-position-y: calc(-104px - 12px);}
		.linkflair-mod .thumbnail.default::before, .linkflair-mod     .thumbnail.self::before {border-bottom-color: #27b062}
		.linkflair-mod .thumbnail.default::after, .linkflair-mod     .thumbnail.self::after {border-top-color: #27b062}

/* End Addon: Hexagonal Thumbnails */
3 Upvotes

7 comments sorted by

View all comments

Show parent comment

1

u/Artimec_w Sep 26 '17

All rules before /* Misc. Fixes /Naut/ Thumbnails */ comment are critical!

1

u/Elitedrones Sep 26 '17

Should I erase everything after misc?

1

u/Artimec_w Sep 26 '17

As i can see, /r/ApicemLight/ theme doesn't use icons inside default thumbnails, so YES

1

u/Elitedrones Sep 27 '17

Thanks after some tinkering I found the solution to all the codes to make them appear the right way.