Skip to content

Commit

Permalink
Refs #37882 - move css from vendor to foreman
Browse files Browse the repository at this point in the history
  • Loading branch information
MariaAga committed Oct 4, 2024
1 parent 436d9a3 commit 56b034d
Show file tree
Hide file tree
Showing 14 changed files with 74 additions and 44 deletions.
1 change: 0 additions & 1 deletion app/views/layouts/base.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

<%= favicon_link_tag "favicon.ico"%>

<%= get_webpack_foreman_vendor_css %>
<%= stylesheet_link_tag 'application' %>
<%= yield(:stylesheets) %>

Expand Down
32 changes: 0 additions & 32 deletions developer_docs/adding-dependencies.asciidoc

This file was deleted.

1 change: 1 addition & 0 deletions webpack/assets/javascripts/react_app/Root/ReactApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import apolloClient from './apollo';
import ToastsList from '../components/ToastsList';
import ErrorBoundary from '../components/common/ErrorBoundary';
import ConfirmModal from '../components/ConfirmModal';
import '../common/scss/vendor-core.scss';

const ReactApp = ({ layout, metadata, toasts }) => {
const [context, setContext] = useState({ metadata });
Expand Down
21 changes: 21 additions & 0 deletions webpack/assets/javascripts/react_app/common/scss/mixins.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Mixins - Bootstrap overrides
// -------------------
@mixin box-shadow($shadow...) {
-webkit-box-shadow: $shadow; // iOS <4.3 & Android <4.1
box-shadow: $shadow;
}

// Form control outline
@mixin form-control-outline($color: $input-border-focus){
$color-rgba: rgba(red($color), green($color), blue($color), .6);
&:focus {
border-color: $color;
outline: 0 !important;
@include box-shadow(unquote("inset 0 1px 1px rgba(3, 3, 3, 0.075), 0 0 8px #{$color-rgba}"));
}
}
/**
Third Party mixins imports here
*/
@import '~patternfly/dist/sass/patternfly/bootstrap-mixin-overrides';
@import '~patternfly/dist/sass/patternfly/mixins';
22 changes: 22 additions & 0 deletions webpack/assets/javascripts/react_app/common/scss/vendor-core.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
Third Party libraries imports here
*/
@import '../variables';
@import './mixins';

@import '~multiselect/css/multi-select.css';
@import '~react-diff-view/style/index.css';
@import '~select2/select2-bootstrap.css';
@import '~select2/select2.css';
@import "~dsmorse-gridster/dist/jquery.gridster";
@import "~datatables.net-bs/css/dataTables.bootstrap.css";
// @import "~@redhat-cloud-services/frontend-components/index.css";

// patternfly v3
@import '~patternfly-react/dist/sass/_patternfly-react.scss';
@import '~patternfly-react-extensions/dist/sass/_select.scss';
@import '~patternfly/dist/sass/patternfly/_loading-state';

// patternfly v4
@import '~@patternfly/patternfly/patternfly';
@import '~@patternfly/patternfly/patternfly-addons';
23 changes: 21 additions & 2 deletions webpack/assets/javascripts/react_app/common/variables.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
@import '~@theforeman/vendor/scss/variables.scss';
/**
Third Party variables imports here
*/
// patternfly v3
$font-path: '~patternfly/dist/fonts/';
$img-path: '~patternfly/dist/img/';
$icon-font-path: '~patternfly/dist/fonts/';

$header-max-width: calc(#{$pf-global--breakpoint--lg} + 70px); //TODO move into @theforeman/vendor/scss/variables
// patternfly v4
$pf-global--font-path: '~@patternfly/patternfly/assets/fonts';
$fa-font-path: '~@patternfly/patternfly/assets/fonts/webfonts';
$pf-global--fonticon-path: '~@patternfly/patternfly/assets/pficon';
$pf-global--image-path: '~@patternfly/patternfly/assets/images';

// patternfly v3
@import '~bootstrap-sass/assets/stylesheets/bootstrap/variables';
@import '~patternfly/dist/sass/patternfly/variables';

// patternfly v4
@import '~@patternfly/patternfly/base/patternfly-variables';

$header-max-width: calc(#{$pf-global--breakpoint--lg} + 70px);
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "~@theforeman/vendor/scss/variables";
@import "../../../../common/variables";

@keyframes blink {
0% {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '~@theforeman/vendor/scss/variables';
@import '../../../../common/variables.scss';

.pf-c-masthead .pf-c-toolbar {
.pf-c-context-selector__menu-search {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '~@theforeman/vendor/scss/variables';
@import '../../common/variables.scss';

$caption_font_weight: 600;
$background_image: url('../LoginPage/background.svg');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '~@theforeman/vendor/scss/variables';
@import '../../../common/variables.scss';

.bookmarks-dropdown-item {
word-break: break-word;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import "~@theforeman/vendor/scss/variables";
@import '../../common/colors.scss';
@import '../../common/variables.scss';

.ReactPasswordStrength {
.ReactPasswordStrength-input {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '~@theforeman/vendor/scss/variables';
@import '../../common//variables.scss';

.autocomplete-search {
width: 100%;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "~@theforeman/vendor/scss/variables";
@import "../../../../common/variables.scss";

$screen-md: 992px !default;
$screen-md-min: $screen-md !default;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import "~@theforeman/vendor/scss/variables";
@import "~@theforeman/vendor/scss/mixins";
@import "../../../common/variables";
@import "../../../common/scss/mixins";

.foreman-numeric-input {
position: relative;
Expand Down

0 comments on commit 56b034d

Please sign in to comment.