• maurillo

    (@maurillo)


    When I apply in UI any section variation the “core/post-author-name” and “core/post-date” do not take the currenteColor ( but also if I set another color in the section.json files ).

    These two blocks always keep the preset|color|accent-4 of theme.jason.

    Is this normal?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    I am trying to narrow down what is happening, but I am not able to reproduce it.
    I am not seeing any problems, so I might be misunderstanding what you mean with “do not take currentColor”

    1. I added a group block.
    2. Inside it I added a paragraph with a link. This is so that I could compare the color of the other blocks to the regular text.
    3. Then I added two author name blocks, and two date blocks: with and without the link option enabled.
    4. Then I activated each section style.
    5. Next I opened the Site Editor style variation selector and changed the colors site wide, and both the text color and the link color still worked.

    If I change the text and link color of the group block, the colors of the inner blocks also change correctly.

    Is it the text color or link color that is not working?
    Both these blocks have the option to be links. If the link option is used, the link color will be applied, not the text color.

    Is it a specific combination of a site wide style variation and block style that is not working?

    Have you saved any changes using the Styles sidebar or custom CSS, or activated a style variation? Then the changes are saved in the database, and changes to the json files will not be applied because WordPress will use the database values first.

    Thread Starter maurillo

    (@maurillo)

    Hi Carolina!

    I am a great admirer for how you explain and I am follower of your FSE site from the beginning.

    I write with translator, I am in Italy and my English language is a bit poor. I hope to explain myself as best I can.

    The issue is not a big problem, but I would like to understand if I am wrong?
    With the default twentytwentyfive theme, without making any changes my steps are:

    1 SiteEditor > templates > Single Posts.

    2 In the editor I select the main group and then in the right panel of styles I set Style 4 ( but the output it is the same with all 5 options). At this point all changes color excluding the text “Written by omniumlexAdmin in Uncategorized”.?

    You wrote: “Is it the text color or link color that is not working?”
    Me: It is the color of the text and also the color of the link that does not change.

    You wrote: Is it a specific combination of a site wide style variation and block style that is not working?
    Me: I think they are called section styles
    Link to see here?

    I prefer this small text to be easier to read, also because later I would like to change the background to another color, which is even harder to match than Accent-3.
    Link to see detail here

    3 I thought I solved it by editing the relevant jason file. So I go to twentytwentyfive > styles > sections > section-4.json.

    In the section-4.json file I find the fields set to currentColor.


    "blocks": {...
    ....}
    },
    "core/post-author-name": {
    "color": {
    "text": "currentColor"
    },
    "elements": {
    "link": {
    "color": {
    "text": "currentColor"
    }
    }
    }
    },
    "core/post-terms": {
    "color": {
    "text": "currentColor"
    },
    "elements": {
    "link": {
    "color": {
    "text": "currentColor"
    }
    }
    }
    }


    4 I ask are these two the fields that generate the text color printed in “Written by omniumlexAdmin in Uncategorized”? (“core/post-author-name” & “core/post-terms”)

    5 I could solve it by editing in the editor, but I will give the site to person who does not want to intervene with the settings. I will probably disable the settings when the work is done to leave only the section style buttons.

    So I’d like when I choose this option in the back-end with the button to also change that part of the text that always stays the same color: how can I do that?

    6? I tried replacing currentColor in section-4.json file with a hexadecimal color, but it doesn’t change. Am I getting the fields wrong? Am I getting files wrong?

    You wrote: Have you saved any changes using the Styles sidebar or custom CSS, or activated a style variation?
    I answer: No. There are no changes saved in the database
    – The Global Style is the default.?
    – Custom CSS there are none except of course the ADDITIONAL CSS CLASS(ES) field in sidebar: is-style-section-4.
    – The theme is updated. WordPress is newly installed.
    – Plugins few and all deactivated
    – It’s the same on the Chrome, Firefox and Brave browsers on Mac os
    – Also on mobile device.
    – Also result on server local (MAMP)

    If you don’t see any problems, tell me and I’ll send you the link to my staging site hosted on Hostinger

    Thanks for your kind attention

    Ciao

    Mauro

    • This reply was modified 1 month ago by maurillo.

    Hi

    Thank you for the detailed report.
    I was able to reproduce it using the single post template.

    In this template, the color is set directly on the row block that contains the paragraph “Written by”, “in”, post author and categories.
    Because the color class name is added to the HTML markup of the row, the text color is not updated like the rest of the body text color. That is also why it is not changed on the single post template when you change it in the JSON file for section 4.

    I think this is an oversight, it is not intended, and I can open a bug ticket for it.

    Thread Starter maurillo

    (@maurillo)

    Hi,
    I solved through this indication:

    In this template, the color is set directly on the row block that contains the paragraph “Written by”, “in”, post author and categories.
    Because the color class name is added to the HTML markup of the row… …

    1. In the section.json files I set the color.text with the contrast I wanted
    2. In the Single Post template I selected the row block you indicated to me. And in the color palette I chose Clear to remove any color assigned.

    Now the contrast of the style variations are a wonder!

    3. With the Create Block Theme plugin I then made a clone of the theme to prevent TT5 updates overwriting the files in the styles > sections folder. I had also changed enough settings in the theme.json and the default color palette and fonts.

    Thanks for the valuable advice

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.