[ https://issues.apache.org/jira/browse/WICKET-6890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17821557#comment-17821557 ]
ASF GitHub Bot commented on WICKET-6890: ---------------------------------------- martin-g commented on code in PR #781: URL: https://github.com/apache/wicket/pull/781#discussion_r1505527158 ########## wicket-core/src/main/java/org/apache/wicket/settings/DebugSettings.java: ########## @@ -173,10 +187,24 @@ public DebugSettings setLinePreciseReportingOnNewComponentEnabled(boolean enable * * @param enable * @return {@code this} object for chaining + * @deprecated use {@link #setOutputMarkupContainerClassNameStrategy(ClassOutputStrategy)} instead */ + @Deprecated(forRemoval = true) public DebugSettings setOutputMarkupContainerClassName(boolean enable) { - outputMarkupContainerClassName = enable; + outputMarkupContainerClassNameStrategy = enable ? ClassOutputStrategy.HTML_COMMENT : ClassOutputStrategy.NONE; + return this; + } + + /** + * Sets the strategy for outputting the class of a markup Review Comment: ```suggestion * Sets the strategy for outputting the Java class name of a markup ``` > Render debug setting 'outputMarkupContainerClassName` as an attribute > --------------------------------------------------------------------- > > Key: WICKET-6890 > URL: https://issues.apache.org/jira/browse/WICKET-6890 > Project: Wicket > Issue Type: Improvement > Components: wicket-core > Reporter: Martin Tzvetanov Grigorov > Assignee: Martin Tzvetanov Grigorov > Priority: Major > Fix For: 10.0.0-M1 > > > As discussed at [https://markmail.org/message/uoxxlnbz56ex7vuk] when > org.apache.wicket.settings.DebugSettings#isOutputMarkupContainerClassName() > returns true then the MarkupContainer class name should be rendered as an > attribute of the component tag instead of as an HTML comment because an HTML > comment may break a CSS rule, e.g. by appearing between two sibling HTML > elements > {code:java} > p + p {color: red;} {code} > > The CSS rule above will change the text color of any paragraph that follows > another paragraph. But if an HTML comment appears between them then the rule > won't apply. -- This message was sent by Atlassian Jira (v8.20.10#820010)