Skip to content

Commit b55c024

Browse files
committed
refactor: improve emmet code readability
1 parent f69a697 commit b55c024

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

src/extensions/default/CSSCodeHints/main.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,9 +522,10 @@ define(function (require, exports, module) {
522522
}
523523

524524
const $emmetHintObj = $("<span>")
525-
.addClass("brackets-css-hints brackets-hints emmet-hint")
525+
.addClass("brackets-css-hints brackets-hints")
526526
.attr("data-val", expandedAbbr)
527-
.attr("data-isEmmet", true);
527+
.attr("data-isEmmet", true)
528+
.css("margin-right", "48px");
528529

529530
// for highlighting the already-typed characters
530531
if (token.stringRanges) {

src/extensions/default/HTMLCodeHints/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,15 @@ define(function (require, exports, module) {
145145
function formatEmmetHint(abbr) {
146146
// Create the main container for the hint
147147
var $hint = $("<span>")
148-
.addClass("emmet-hint");
148+
.css("margin-right", "48px");
149149

150150
// Create a wrapper for the text content
151151
var $textContent = $("<span>")
152152
.addClass("emmet-text-content")
153153
.text(abbr);
154154

155155
// style in brackets_patterns_override.less file
156-
let $icon = $(`<span class="emmet-code-hint">Emmet</span>`);
156+
let $icon = $(`<span class="emmet-html-code-hint">Emmet</span>`);
157157

158158
// Append both text content and icon to the main container
159159
$hint.append($textContent);

src/styles/brackets_patterns_override.less

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -727,11 +727,11 @@ a:focus {
727727
}
728728
}
729729

730-
.emmet-code-hint {
730+
.emmet-html-code-hint {
731731
visibility: hidden;
732732
}
733733

734-
.codehint-menu .dropdown-menu li a.highlight .emmet-code-hint {
734+
.codehint-menu .dropdown-menu li a.highlight .emmet-html-code-hint {
735735
visibility: visible;
736736
position: absolute;
737737
right: 1rem;
@@ -744,10 +744,6 @@ a:focus {
744744
}
745745
}
746746

747-
.emmet-hint {
748-
margin-right: 48px !important;
749-
}
750-
751747
.emmet-text-content {
752748
display: inline-block;
753749
max-width: 320px;

0 commit comments

Comments
 (0)