Skip to content

Commit 42fbe15

Browse files
committed
Migrate less from v2 to v4
v2 is no longer maintained. The only incompatibility I found that affects us is that divisions must now be inside parentheses.
1 parent 50bf51f commit 42fbe15

File tree

3 files changed

+70
-198
lines changed

3 files changed

+70
-198
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"knockout-arraytransforms": "git://github.com/mwiencek/knockout-arraytransforms.git#9673e91",
4444
"leaflet": "1.6.0",
4545
"leaflet.markercluster": "1.4.1",
46-
"less": "2.7.3",
46+
"less": "4.1.1",
4747
"less-loader": "4.1.0",
4848
"less-plugin-clean-css": "1.5.1",
4949
"leven": "2.0.0",

root/static/styles/forms.less

+8-8
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ table.row-form {
250250
> tbody > tr, > thead > tr {
251251
> td:first-child, > th:first-child {
252252
min-width: @form-label-width;
253-
padding: @form-margin / 2;
253+
padding: (@form-margin / 2);
254254
padding-bottom: 9px;
255255
box-sizing: border-box;
256256
vertical-align: top;
@@ -619,7 +619,7 @@ table.artist-credit-editor {
619619
#external-links-editor {
620620
td {
621621
vertical-align: top;
622-
padding-top: @form-margin / 2;
622+
padding-top: (@form-margin / 2);
623623

624624
&:first-child {
625625
min-width: 75px;
@@ -633,7 +633,7 @@ table.artist-credit-editor {
633633

634634
.external-link-item {
635635
td {
636-
padding-bottom: @form-margin / 4;
636+
padding-bottom: (@form-margin / 4);
637637
}
638638

639639
td:first-child {
@@ -660,15 +660,15 @@ table.artist-credit-editor {
660660

661661
.relationship-item {
662662
td {
663-
padding-top: @form-margin / 4;
664-
padding-bottom: @form-margin / 4;
663+
padding-top: (@form-margin / 4);
664+
padding-bottom: (@form-margin / 4);
665665
}
666666

667667
div.relationship-content {
668668
display: flex;
669669

670670
label {
671-
margin-right: @form-margin / 2;
671+
margin-right: (@form-margin / 2);
672672
white-space: nowrap;
673673
}
674674

@@ -700,7 +700,7 @@ table.artist-credit-editor {
700700

701701
#external-links-editor, #work-attributes {
702702
width: 100%;
703-
padding: @form-margin / 2;
703+
padding: (@form-margin / 2);
704704

705705
td:first-child select {
706706
max-width: @form-label-width - @form-margin;
@@ -782,7 +782,7 @@ div.rel-editor-dialog {
782782
.change-direction { padding: 2px !important; }
783783

784784
.attribute-container {
785-
margin-bottom: @form-margin / 2;
785+
margin-bottom: (@form-margin / 2);
786786
}
787787

788788
.attribute-credit {

0 commit comments

Comments
 (0)