#417 [frontend] sync style-overwrite.css with generate_colorscheme
Merged 5 years ago by praiskup. Opened 5 years ago by praiskup.

file modified
+2 -2
@@ -11,7 +11,7 @@

  # changing the version we make the package explicitly incompatible and

  # third-party flavor providers are notified they have to update their packages,

  # too.

- %global flavor_guard      %name-flavor = 2

+ %global flavor_guard      %name-flavor = 3

  %global flavor_provides   Provides: %flavor_guard

  %global flavor_files_list %_datadir/copr/copr-flavor-filelist

  %global flavor_generator  %_datadir/copr/coprs_frontend/generate_colorscheme
@@ -22,7 +22,7 @@

  %staticdir/header_background.png                \

  %staticdir/favicon.ico                          \

  %staticdir/copr_logo.png                        \

- %staticdir/css/style-overwrite.css              \

+ %staticdir/css/copr-flavor.css                  \

  %templatedir/project_info.html                  \

  %templatedir/user_meta.html                     \

  %templatedir/welcome.html                       \

@@ -0,0 +1,2 @@

+ /* NEVER edit this file manually, it's generated by ./coprs_frontend/generate_colorscheme */

+ a{color:#2b64b4}a:hover,a:focus{color:#214d8b}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active{color:#214d8b}h3 a{color:#214d8b !important}.btn-primary{background-color:#214d8b;background-image:linear-gradient(to bottom, #2b64b4 0, #214d8b 100%);border-color:#2b64b4}.btn-primary:hover,.btn-primary:focus{background-color:#558bd7;border-color:#558bd7}table.datatable thead .sorting_asc,table.datatable thead .sorting_desc{color:#214d8b !important} 

\ No newline at end of file

@@ -1,4 +1,4 @@

- a{color:#2b64b4}a:hover,a:focus{color:#214d8b}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active{color:#214d8b}h3 a{color:#214d8b !important}.btn-primary{background-color:#214d8b;background-image:linear-gradient(to bottom, #2b64b4 0, #214d8b 100%);border-color:#2b64b4}.btn-primary:hover,.btn-primary:focus{background-color:#558bd7;border-color:#558bd7}table.datatable thead .sorting_asc,table.datatable thead .sorting_desc{color:#214d8b !important}.footer dd ul{padding-left:0;list-style:none}

+ .footer dd ul{padding-left:0;list-style:none}

  .list-group-item-heading{font-weight:700}

  pre{background-color:#f8f8f8;padding: 9.5px 9.5px 0px 9.5px;}

  pre code div {margin-bottom:-11px; margin-top:-2px; font-size:12px}

@@ -27,6 +27,7 @@

    <script src="{{ url_for('static', filename='copr.js') }}"></script>

    <link rel=stylesheet type=text/css href="{{ url_for('static', filename='copr.css') }}">

    <link rel=stylesheet type=text/css href="{{ url_for('static', filename='css/style-overwrite.css') }}">

+   <link rel=stylesheet type=text/css href="{{ url_for('static', filename='css/copr-flavor.css') }}">

  </head>

  

  <body>

@@ -25,7 +25,9 @@

  

  mkdir -p "$opt_static_files/css"

  

- cat <<EOF | lessc -x - | tee $opt_static_files/css/style-overwrite.css

+ warning="/* NEVER edit this file manually, it's generated by $0 */"

+ 

+ cat <<EOF | ( echo "$warning" ; lessc -x - ) | tee $opt_static_files/css/copr-flavor.css

  @base: $opt_base_color;

  @lighten: lighten(@base, 10%);

  a {
@@ -55,11 +57,6 @@

  table.datatable thead .sorting_asc, table.datatable thead .sorting_desc {

      color: @base !important;

  }

- 

- .footer dd ul {

-     padding-left: 0;

-     list-style: none;

- }

  EOF

  

  lighten_base ()

Run generate_colorscheme for each copr frontend build to not
forget about touching it in the future.

rebased onto 210aaed

5 years ago

Btw., this explains why internal copr has weird thin fonts in the list of projects (discussed on last meeting).

rebased onto 6b4d804354c71a7bae6ff0c9c33293a997a5b07c

5 years ago

Note that the stuff in style-overwrite.css (should be rather called style-override.css) are updates upon default patternfly css, should be applicable across all copr themes and they have generally nothing to do with a given theme/colorscheme. That's why the file is linked from layout.html by default:

coprs/templates/layout.html:  <link rel=stylesheet type=text/css href="{{ url_for('static', filename='css/style-overwrite.css') }}">

Thererefore it's quite strange that the font width wasn't correct for you automatically but I think it would be better to focus and fix that problem specifically.

Another side thing is that BuildRequiring ImageMagick means:

Total download size: 28 M
Installed size: 95 M

And that's because one convert call.

It would be perfect if you proposed concrete ideas what should be changed.

The style-override.css is part of copr-frontend-fedora flavor.

It would be perfect if you proposed concrete ideas what should be changed.

I propose moving the stuff from style-overwrite.css to style-override.css and keep style-overwrite.css in the flavor API or move style-overwrite.css out of the flavor api.

The style-override.css is part of copr-frontend-fedora flavor.

That's style-overwrite.css currently.

The third option is to fix the font width etc in your flavor if you don't want to change anything globally.

I propose moving the stuff from style-overwrite.css to style-override.css and keep style-overwrite.css in the flavor API or move style-overwrite.css out of the flavor api.

ACK.

The third option is to fix the font width etc in your flavor if you don't want to change anything globally.

This is not an option. The font is changed globally, so I want to inherit the upstream changes without piece-by-piece backporting.

Another side thing is that BuildRequiring ImageMagick means:

What is your suggestion to this problem? Is the additional BR a problem actually?

1 new commit added

  • [frontend] split style-overwrite.css into two parts
5 years ago

Please take another look.

I propose moving the stuff from style-overwrite.css to style-override.css and keep style-overwrite.css in the flavor API or move style-overwrite.css out of the flavor api.

ACK.

The third option is to fix the font width etc in your flavor if you don't want to change anything globally.

This is not an option. The font is changed globally, so I want to inherit the upstream changes without piece-by-piece backporting.

Another side thing is that BuildRequiring ImageMagick means:

What is your suggestion to this problem? Is the additional BR a problem actually?

Might be. It takes more time and more download "bandwidth" to test building copr-frontend in a container for instance.

The thing is that i would expect to have:

  • one file called 'style-override.css' to do global changes upon patternfly
  • one file called 'theme.css' where to put theme specific css tweaks

The font width fix should go into the first file probly. So maybe that should be the way to fix the problem with "incorrect" font-width on other copr instances.

The font width fix should go into the first file probly. So maybe that should be the way to fix the problem with "incorrect" font-width on other copr instances.

So I did, I only used your originally proposed names. PTAL

rebased onto f6113cd

5 years ago

Updated once more to more clear naming, additional BR dropped. Please review.

Thanks for the review!

Pull-Request has been merged by praiskup

5 years ago