Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#2112] Move Segment CSS into segment.vue #2113

Merged
merged 4 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 0 additions & 73 deletions frontend/src/components/c-authorship-file.vue
Original file line number Diff line number Diff line change
Expand Up @@ -347,78 +347,5 @@ export default defineComponent({
padding-left: 4rem;
}
}

.segment {
border-left: .25rem solid mui-color('green');

.code {
background-color: mui-color('github', 'authored-code-background');
padding-left: 1rem;
}

.line-number {
color: mui-color('grey');
float: left;
// Not allowing user to select text
-webkit-touch-callout: none;
/* iOS Safari */
-webkit-user-select: none;
/* Safari */
-khtml-user-select: none;
/* Konqueror HTML */
-moz-user-select: none;
/* Firefox */
-ms-user-select: none;
/* Internet Explorer/Edge */
user-select: none;
/* Non-prefixed version, currently supported by Chrome and Opera */
width: 2rem;

// overwrite all hljs colors
[class^='hljs'] {
color: mui-color('grey');
}
}

.line-content {
padding-left: 2rem;
word-break: break-word;
}

&.untouched {
$grey: mui-color('grey', '400');
border-left: .25rem solid $grey;
height: 20px;
/* height of a single line of code */
position: relative;

&.active {
height: auto;

.code {
background-color: mui-color('white');
}
}

.closer {
cursor: pointer;
// custom margin for position of toggle icon
margin: .2rem 0 0 -.45rem;
position: absolute;

&.bottom {
//custom margin for position of toggle icon at the bottom of segment
margin: -1.05rem 0 0 -.45rem;
}

.icon {
background-color: mui-color('white');
color: mui-color('grey');
width: .75em;
}
}
}
}

}
</style>
74 changes: 73 additions & 1 deletion frontend/src/components/c-segment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,78 @@ export default defineComponent({
});
</script>

<style lang="css">
<style lang="scss" scoped>
@import '../styles/hightlight-js-style.css';

.segment {
border-left: .25rem solid mui-color('green');

.code {
background-color: mui-color('github', 'authored-code-background');
padding-left: 1rem;
}

.line-number {
color: mui-color('grey');
float: left;
// Not allowing user to select text
-webkit-touch-callout: none;
/* iOS Safari */
-webkit-user-select: none;
/* Safari */
-khtml-user-select: none;
/* Konqueror HTML */
-moz-user-select: none;
/* Firefox */
-ms-user-select: none;
/* Internet Explorer/Edge */
user-select: none;
/* Non-prefixed version, currently supported by Chrome and Opera */
width: 2rem;

// overwrite all hljs colors
[class^='hljs'] {
color: mui-color('grey');
}
}

.line-content {
padding-left: 2rem;
word-break: break-word;
}

&.untouched {
$grey: mui-color('grey', '400');
border-left: .25rem solid $grey;
height: 20px;
/* height of a single line of code */
position: relative;

&.active {
height: auto;

.code {
background-color: mui-color('white');
}
}

.closer {
cursor: pointer;
// custom margin for position of toggle icon
margin: .2rem 0 0 -.45rem;
position: absolute;

&.bottom {
//custom margin for position of toggle icon at the bottom of segment
margin: -1.05rem 0 0 -.45rem;
}

.icon {
background-color: mui-color('white');
color: mui-color('grey');
width: .75em;
}
}
}
}
</style>
Loading