Commit 0290d979 authored by Himanshu Kapoor's avatar Himanshu Kapoor Committed by Filipa Lacerda

Fix style-lint errors in wiki.scss

There were two errors: duplicate styles and @extend used with a class
name. I added `.top-area` class to all the instances where
`.wiki-page-header` is used since %top-area didn't really make a lot of
sense as a placeholder selector. This is also consistent with behaviour
on other pages where the `.top-area` class is used alongside the other
classes for the specific header styling.
parent 8fc2fbb6
.new-wiki-page {
.new-wiki-page-slug-tip {
display: inline-block;
max-width: 100%;
margin-top: 5px;
}
}
.wiki-form {
.edit-wiki-page-slug-tip {
display: inline-block;
max-width: 100%;
margin-top: 5px;
}
}
.title .edit-wiki-header {
width: 780px;
margin-left: auto;
......@@ -22,7 +6,6 @@
}
.wiki-page-header {
@extend .top-area;
position: relative;
.wiki-breadcrumb {
......
......@@ -14,7 +14,7 @@
.col-sm-12
= f.text_field :title, class: 'form-control qa-wiki-title-textbox', value: @page.title
- if @page.persisted?
%span.edit-wiki-page-slug-tip
%span.d-inline-block.mw-100.prepend-top-5
= icon('lightbulb-o')
= s_("WikiEditPageTip|Tip: You can move this page by adding the path to the beginning of the title.")
= link_to icon('question-circle'), help_page_path('user/project/wiki/index', anchor: 'moving-a-wiki-page'), target: '_blank'
......
......@@ -11,7 +11,7 @@
= label_tag :new_wiki_path do
%span= s_("WikiPage|Page slug")
= text_field_tag :new_wiki_path, nil, placeholder: s_("WikiNewPagePlaceholder|how-to-setup"), class: 'form-control', required: true, :'data-wikis-path' => project_wikis_path(@project), autofocus: true
%span.new-wiki-page-slug-tip
%span.d-inline-block.mw-100.prepend-top-5
= icon('lightbulb-o')
= s_("WikiNewPageTip|Tip: You can specify the full path for the new file. We will automatically create any missing directories.")
.form-actions
......
......@@ -5,7 +5,7 @@
= wiki_page_errors(@error)
.wiki-page-header.has-sidebar-toggle
.wiki-page-header.top-area.has-sidebar-toggle
%button.btn.btn-default.sidebar-toggle.js-sidebar-wiki-toggle{ role: "button", type: "button" }
= icon('angle-double-left')
......
- @content_class = "limit-container-width" unless fluid_layout
- page_title s_("WikiClone|Git Access"), _("Wiki")
.wiki-page-header.has-sidebar-toggle
.wiki-page-header.top-area.has-sidebar-toggle
%button.btn.btn-default.d-block.d-sm-block.d-md-none.float-right.sidebar-toggle.js-sidebar-wiki-toggle{ role: "button", type: "button" }
= icon('angle-double-left')
......
- page_title _("History"), @page.human_title, _("Wiki")
.wiki-page-header.has-sidebar-toggle
.wiki-page-header.top-area.has-sidebar-toggle
%button.btn.btn-default.sidebar-toggle.js-sidebar-wiki-toggle{ role: "button", type: "button" }
= icon('angle-double-left')
......
......@@ -5,7 +5,7 @@
- sort_title = wiki_sort_title(params[:sort])
%div{ class: container_class }
.wiki-page-header
.wiki-page-header.top-area
.nav-text.flex-fill
%h2.wiki-page-title
......
......@@ -4,7 +4,7 @@
- page_title @page.human_title, _("Wiki")
- add_to_breadcrumbs _("Wiki"), project_wiki_path(@project, :home)
.wiki-page-header.has-sidebar-toggle
.wiki-page-header.top-area.has-sidebar-toggle
%button.btn.btn-default.sidebar-toggle.js-sidebar-wiki-toggle{ role: "button", type: "button" }
= icon('angle-double-left')
......
---
title: Fix the style-lint errors and warnings for `app/assets/stylesheets/pages/wiki.scss`
merge_request: 31656
author:
type: other
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment