Template talk:Center
Latest comment: 5 days ago by Jan.Kamenicek in topic nomargin
Making the extra line optional
[edit]When the template is used, such as for the {{***}} template, an extra line is added which for some pages is not needed. Is there a way to make the removal of the extra line optional, so as to not break any existing pages which rely on the extra line? -Einstein95 (talk) 11:16, 16 April 2016 (UTC)
- @Einstein95: {{***}} itself contains an internal invocation of {{center}}, so why in the world would you ever find it useful to wrap it in yet a further copy of center? Expecting the template to anticipate and presumably conditionally ignore this sort of swallow-your-own-tail behaviour is a bit unreasonable, isn't it? If I have misunderstood you then please restate the issue. AuFCL (talk) 12:28, 16 April 2016 (UTC)
- @AuFCL: I'm talking about the internal invocation of {{center}} which is causing the issue. Sorry if I didn't word myself better. -Einstein95 (talk) 12:30, 16 April 2016 (UTC)
- My turn to have misunderstood: I thought you were talking about usage like that appearing here, which I find a little disheartening. Perhaps your point might be less ambiguous if raised (in fact adding to the existing discussion) at template talk:***#Issue_based_on_.7B.7Bcenter.7D.7D? AuFCL (talk) 12:39, 16 April 2016 (UTC)
- Yeah, that'd be good. I raised the issue here as it was the template that was being used that causes the issue. -Einstein95 (talk) 17:48, 16 April 2016 (UTC)
- My turn to have misunderstood: I thought you were talking about usage like that appearing here, which I find a little disheartening. Perhaps your point might be less ambiguous if raised (in fact adding to the existing discussion) at template talk:***#Issue_based_on_.7B.7Bcenter.7D.7D? AuFCL (talk) 12:39, 16 April 2016 (UTC)
- @AuFCL: I'm talking about the internal invocation of {{center}} which is causing the issue. Sorry if I didn't word myself better. -Einstein95 (talk) 12:30, 16 April 2016 (UTC)
Adding optional class-classes
[edit]Appending a {{#if:{{{class|}}}|{{{class}}}}}
code inside class attribute, the template would respond to ccs stored in styles.css page of Index page. A test is running into template's Sandbox. --Alex brollo (talk) 02:01, 22 March 2023 (UTC)
- @Xover I see that you are one of last contributors of template. I hope that my proposal will turn out useful. Alex brollo (talk) 14:46, 24 March 2023 (UTC)
- @Alex brollo: Done. Note that once you're at the level of classing individual {{c}} invocations this can create maintainability problems. Use with good sense! Xover (talk) 09:24, 25 March 2023 (UTC)
- @Xover Thanks! Using styles.css subpage of individual Index pages, I hope that maintainability issues are limited. It.wikisource makes a large use of a it:template:Ct, that allows fine tuning of centered text (most useful into frontispieces and other special pages), where
class
parameter will be useful to harmonize repetitive use of C template for section titles into individual books. I'll test results into Lives of the Most Excellent Painters, Sculptors, and Architects. Alex brollo (talk) 10:55, 25 March 2023 (UTC)- @Alex brollo: Yes, when there are a large number of similar exceptions to base center formatting in a single work is where it'll work well. I'm just making a general note of caution along the lines of "with great power comes great responsibility". Xover (talk) 11:16, 25 March 2023 (UTC)
- @Xover I suspect a mistake into the syntax
{{#if:{{{class|}}}|{{{class}}}}
... five, and not four, closing brackets are needed. :-( Alex brollo (talk) 19:28, 2 April 2023 (UTC)- @Alex brollo: Fixed. Did I mention how much I hate MW's template syntax? Grr. Xover (talk) 06:39, 3 April 2023 (UTC)
- @Xover Thanks! I hate even more ill-formed MW syntax, as double-triple apostrophes... :-( Alex brollo (talk) 06:48, 3 April 2023 (UTC)
- @Alex brollo: Fixed. Did I mention how much I hate MW's template syntax? Grr. Xover (talk) 06:39, 3 April 2023 (UTC)
- @Xover I suspect a mistake into the syntax
- @Alex brollo: Yes, when there are a large number of similar exceptions to base center formatting in a single work is where it'll work well. I'm just making a general note of caution along the lines of "with great power comes great responsibility". Xover (talk) 11:16, 25 March 2023 (UTC)
- @Xover Thanks! Using styles.css subpage of individual Index pages, I hope that maintainability issues are limited. It.wikisource makes a large use of a it:template:Ct, that allows fine tuning of centered text (most useful into frontispieces and other special pages), where
- @Alex brollo: Done. Note that once you're at the level of classing individual {{c}} invocations this can create maintainability problems. Use with good sense! Xover (talk) 09:24, 25 March 2023 (UTC)
nomargin
[edit]I suggest to make the "nomargin" as default, i. e. to replace {{#if:{{{nomargin|}}}|wst-center-nomargin}}
with wst-center-nomargin
. -- Jan Kameníček (talk) 10:46, 27 October 2024 (UTC)