Skip to content

Commit

Permalink
Stop over-hashtargeting.
Browse files Browse the repository at this point in the history
  • Loading branch information
kohler committed Aug 31, 2024
1 parent f4c4e32 commit 1c4e9b6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 20 deletions.
2 changes: 1 addition & 1 deletion devel/manual/css.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Generic values
* `.overlong-content`: 1
* `.overlong-collapsed > .overlong-content`: 0
* `.overlong-collapsed > .overlong-divider > .overlong-mark`: 2
* `.cmtcard.is-editing.popout`: 4
* `.cmtcard.edit.popout`: 4

## `id`

Expand Down
7 changes: 4 additions & 3 deletions scripts/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -7264,7 +7264,8 @@ function cmt_toggle_editing(celt, editing) {
editor_observer.observe(e);
editor_observer.observe(celt);
}
toggleClass(celt, "is-editing", !!editing);
toggleClass(celt, "view", !editing);
toggleClass(celt, "edit", !!editing);
if (!editing) {
removeClass(celt, "popout");
} else if (editing === 2) {
Expand Down Expand Up @@ -7642,7 +7643,7 @@ function add_new_comment_button(cj, cid) {

function add_new_comment(cj, cid) {
document.querySelector(".pcontainer").insertBefore($e("article", {
id: cid, "class": "pcard cmtcard cmtid comment need-anchor-unfold has-fold ".concat(cj.collapsed ? "fold20c" : "fold20o", cj.editable ? " editable" : "")
id: cid, "class": "pcard cmtcard cmtid comment view need-anchor-unfold has-fold ".concat(cj.collapsed ? "fold20c" : "fold20o", cj.editable ? " editable" : "")
}), $$("k-comment-actions"));
if (!cj.is_new) {
if (cj.response || cj.visibility === "admin") {
Expand Down Expand Up @@ -14076,7 +14077,7 @@ $(function () {
return p.join(">");
}
var err = [], elt = [];
$(".xinfo,.xconfirm,.xwarning,.xmerror,.aa,.strong,td.textarea,button.btn-link,button.btn-qlink,button.btn-qolink,.btn-xlink,.btn-disabled,a.btn[href=''],.p,.mg").each(function () {
$(".xinfo,.xconfirm,.xwarning,.xmerror,.aa,.strong,td.textarea,a.btn[href=''],.p,.mg,.editor").each(function () {
err.push(locator(this));
elt.push(this);
});
Expand Down
19 changes: 3 additions & 16 deletions stylesheets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -462,14 +462,6 @@ span.barsep {
opacity: 0.8;
padding: 0 0.5em;
}
.editor {
background: url(../images/edit48.png) 0px 50% no-repeat;
background-size: 16px 16px;
display: inline-block;
text-indent: 0;
margin: -2px 0 -2px 0;
padding: 2px 0 2px 19px;
}
span.sep {
padding-right: 1em;
}
Expand Down Expand Up @@ -4459,20 +4451,15 @@ a:hover .t-editor,
.cmtcard.response:last-child {
border-bottom: 5px solid #ffddc1;
}
.cmtcard.comment.is-editing {
.cmtcard.comment.edit {
background: #fdfdfa;
}
.cmtcard.comment + .cmtcard.comment {
.cmtcard.comment.view + .cmtcard.comment.view {
border-top: 0 none;
padding-top: 0;
margin-top: -0.5rem;
}
.cmtcard.comment.is-editing, .cmtcard.is-editing + .cmtcard.comment {
border-top: 5px solid #e6e1cf !important;
padding-top: 1.25rem !important;
}
.revcard.hashtarget header::before,
.cmtcard.hashtarget header::before {
.cmtcard.comment.view.hashtarget header::before {
width: 1rem;
margin-left: -1.25rem;
position: absolute;
Expand Down

0 comments on commit 1c4e9b6

Please sign in to comment.