<commit_before>// Contains the top navbar
.nav {

	// Common settings
	$sub-hover-bkgd: darken($gray-dark, 2%);
	$border: 1px solid $sub-hover-bkgd;

	.top-level-nav {
		padding: 0;
		margin: 0;
		margin-bottom: 50px;
		border-top: $border;

		// the top level nav items (usually contain a subnav)
		.main-nav {
			a {
				display: block;
				border-bottom: $border;
				color: $nav-text;
				font-weight: $headings-font-weight;
				font-weight: 700;
				font-size: 12px;
				padding: $nav-pad;
				cursor: pointer;

				.glyphicon {
					display: inline-block;
					padding-right: 5px;
				}
			}

			.top-level {
				background-color: lighten($gray-dark, 3%);
				
				&:hover {
					color: $nav-text-active;
					.glyphicon { color: $nav-text-active; }
				}
			}

			&.active {
				.top-level {
					color: $nav-text-active;
				}
			}

			// the nested nav items within the parent
			.subnav {
				background-color: darken($gray-dark, 6%);
				overflow: hidden;
				max-height: 0;
				@include transition(all 300ms ease-out);

				a {
					font-size: 12px;
					font-weight: 300;
					padding: 8px;
					border-bottom: 1px solid darken($gray-dark, 4%);
					padding-left: 19px; // adjusted for the transparent left border
					border-left: 3px solid transparent;

					&:hover {
						background-color: $sub-hover-bkgd;
					}

					// highlight the active page
					&.active {
						color: $theme-primary-color;
						border-left: 3px solid $theme-primary-color;
						background-color: $sub-hover-bkgd;
					}
				}
			}

			&.active {
				
				// have the currently expanded subnav show
				.subnav {
					max-height: 900px;
				}
			}
		}
	}

	// hide the nav when you're on mobile widths
	@media(max-width:$screen-sm) {
		left: -200px;
	}
}<commit_msg>Adding active states and transitions to nav<commit_after>// Contains the top navbar
.nav {

	// Common settings
	$sub-hover-bkgd: darken($gray-dark, 2%);
	$border: 1px solid $sub-hover-bkgd;

	.top-level-nav {
		padding: 0;
		margin: 0;
		margin-bottom: 50px;
		border-top: $border;

		// the top level nav items (usually contain a subnav)
		.main-nav {
			a {
				display: block;
				border-bottom: $border;
				color: $nav-text;
				font-weight: $headings-font-weight;
				font-weight: 700;
				font-size: 12px;
				padding: $nav-pad;
				cursor: pointer;

				.glyphicon {
					display: inline-block;
					padding-right: 5px;
				}
			}

			.top-level {
				background-color: lighten($gray-dark, 3%);
				
				@include transition(background 300ms, color 300ms);
				
				&:hover {
					color: $nav-text-active;
					@include transition(background 100ms, color 100ms);
					.glyphicon { color: $nav-text-active; }
				}

				&:active {
					background: $theme-primary-color;
					@include transition(background 100ms, color 100ms);
				}
			}

			&.active {
				.top-level {
					color: $nav-text-active;
				}
			}

			// the nested nav items within the parent
			.subnav {
				background-color: darken($gray-dark, 6%);
				overflow: hidden;
				max-height: 0;
				@include transition(max-height 300ms);

				a {
					font-size: 12px;
					font-weight: 300;
					padding: 8px;
					border-bottom: 1px solid darken($gray-dark, 4%);
					padding-left: 19px; // adjusted for the transparent left border
					border-left: 3px solid transparent;

					@include transition(background 300ms, color 300ms);
					&:hover {
						background-color: $sub-hover-bkgd;
						color: $nav-text-active;
						@include transition(background 100ms, color 100ms);
					}

					&:active {
						background: $theme-primary-color;
						@include transition(background 100ms, color 100ms);
					}

					// highlight the active page
					&.active {
						color: $theme-primary-color;
						border-left: 3px solid $theme-primary-color;
						background-color: $sub-hover-bkgd;
					}
				}
			}

			&.active {
				
				// have the currently expanded subnav show
				.subnav {
					max-height: 900px;
				}
			}
		}
	}

	// hide the nav when you're on mobile widths
	@media(max-width:$screen-sm) {
		left: -200px;
	}
}
{'fraction_non_alphanumeric': 0.1333826429980276, 'fraction_numerical': 0.026627218934911243, 'mean_word_length': 2.269137792103143, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '634335', 'n_tokens_mistral': 1986, 'n_tokens_neox': 1378, 'n_words': 343}