001/*
002 * Copyright (c) 2010, 2022, Oracle and/or its affiliates. All rights reserved.
003 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004 *
005 * This code is free software; you can redistribute it and/or modify it
006 * under the terms of the GNU General Public License version 2 only, as
007 * published by the Free Software Foundation.  Oracle designates this
008 * particular file as subject to the "Classpath" exception as provided
009 * by Oracle in the LICENSE file that accompanied this code.
010 *
011 * This code is distributed in the hope that it will be useful, but WITHOUT
012 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
014 * version 2 for more details (a copy is included in the LICENSE file that
015 * accompanied this code).
016 *
017 * You should have received a copy of the GNU General Public License version
018 * 2 along with this work; if not, write to the Free Software Foundation,
019 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020 *
021 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
022 * or visit www.oracle.com if you need additional information or have any
023 * questions.
024 */
025
026package org.jdrupes.mdoclet.internal.doclets.formats.html.markup;
027
028import java.util.Locale;
029import java.util.regex.Pattern;
030
031/**
032 * Enum representing HTML styles, with associated entries in the stylesheet files.
033 *
034 * @apiNote
035 * Despite the name, the members of this enum provide values for the HTML {@code class} attribute,
036 * and <strong>not</strong> the HTML {@code style} attribute.
037 * This is to avoid confusion with the widespread use of the word "class" in the Java ecosystem,
038 * and the potential for clashes with methods called {@code setClass} instead of {@code setStyle}.
039 *
040 * @apiNote
041 * The description of some members refer to "elements".
042 * This typically refers to "HTML elements", but may in some cases refer to
043 * or {@link javax.lang.model.element.Element "language model elements"}.
044 * The usage is made explicit when it is not clear from the surrounding context.
045 *
046 * @apiNote
047 * The stylized use of {@code editor-fold} comments and line comments (beginning {@code //})
048 * is to support extracting details of declarations with external tools.  Edit with care!
049 *
050 * @see <a href="https://html.spec.whatwg.org/#classes">WhatWG: {@code class} attribute</a>
051 */
052public enum HtmlStyle {
053
054    //<editor-fold desc="navigation bar">
055    //
056    // The following constants are used for the main navigation bar that appears in the
057    // {@code header} and {@code footer} elements on each page.
058
059    /**
060     * The class for the overall {@code div} element containing the {@code header} element for the page.
061     */
062    topNav,
063
064    /**
065     * The class for the element containing the information (such as the product name and version)
066     * provided by the {@code -header} or {@code -footer} command line option.
067     */
068    aboutLanguage,
069
070    /**
071     * The class for the highlighted item in the list of navigation links, indicating
072     * the current page.
073     */
074    // The etymology of the name is a mystery.
075    navBarCell1Rev,
076
077    /**
078     * The class for the navigation bar toggle button for smaller displays.
079     */
080    navBarToggleIcon,
081
082    /**
083     * The class for the primary list of navigation links.
084     */
085    navList,
086
087    /**
088     * The class for the {@code div} element containing the "Search" control.
089     */
090    navListSearch,
091
092    /**
093     * The class for a {@code div} element containing a link to skip the navigation header.
094     * The element is typically invisible, but may be used when navigating the page
095     * with a screen reader.
096     */
097    skipNav,
098
099    /**
100     * The class for a {@code div} element containing a list of subsidiary navigation links.
101     */
102    subNav,
103
104    /**
105     * The class for the list of subsidiary navigation links.
106     */
107    subNavList,
108
109    /**
110     * The class for the list of subsidiary navigation links for smaller displays.
111     */
112    subNavListSmall,
113
114    //</editor-fold>
115
116    //<editor-fold desc="header (title block)">
117    //
118    // The following constants are used for the main "header" ("heading") that
119    // provides the title for the page. This should not be confused with the
120    // {@code header} element that contains the top navigation bar.
121
122    /**
123     * The class for the element that contains all of the main heading for the page.
124     */
125    header,
126
127    /**
128     * The class for the "module" label in the heading for a package declaration.
129     */
130    moduleLabelInPackage,
131
132    /**
133     * The class for the "module" label in the heading for a type declaration.
134     */
135    moduleLabelInType,
136
137    /**
138     * The class for the "package" label in the heading for a type declaration.
139     */
140    packageLabelInType,
141
142    /**
143     * The class for the element containing the label and name for the module
144     * or package that precedes the main title for the declaration of a
145     * package or type.
146     */
147    subTitle,
148
149    /**
150     * The class for the element containing the label and name for
151     * the main title on a page for the declaration of a package or type.
152     */
153    title,
154
155    //</editor-fold>
156
157    //<editor-fold desc="summaries">
158    //
159    // The following constants are used for the HTML elements that provide
160    // summary information, either of the program elements enclosed
161    // by some program element, or in pages providing aggregate information
162    // about similar program elements.
163    // As a general rule, summaries are typically displayed as tables,
164    // with rows containing the name or signature of an element, and the
165    // first sentence of the description of that element. The name or signature
166    // is typically linked to a corresponding "Details" section.
167    //
168    // Note: the "Summary" information on a module declaration page for
169    // "Services" would be better characterized as "Details" information,
170    // since it contains the full text of the descriptions in the
171    // @provides and @uses tags, and not just the first sentence.
172
173    /**
174     * The class for the overall {@code section} element containing all the
175     * different kinds of summary for the parts of the program element
176     * declared on this page.
177     */
178    summary,
179
180    /**
181     * The class for the {@code list} element of all the different kinds of
182     * summary for the parts of the program element declared on this page.
183     */
184    summaryList,
185
186    /**
187     * The class for the {@code section} element containing a summary of
188     * the constructors for a type.
189     */
190    constructorSummary,
191
192    /**
193     * The class for a {@code section} element containing a summary of
194     * the fields of a type.
195     */
196    fieldSummary,
197
198    /**
199     * The class for a {@code section} element containing the members
200     * of a given kind for a type.
201     */
202    memberSummary,
203
204    /**
205     * The class for the {@code section} element containing a summary of
206     * the methods of a type.
207     */
208    methodSummary,
209
210    /**
211     * The class for the {@code section} element containing a summary of
212     * the module dependencies of a module.
213     */
214    modulesSummary,
215
216    /**
217     * The class for the {@code section} element containing a summary of
218     * the nested classes of a type.
219     */
220    nestedClassSummary,
221
222    /**
223     * The class for the {@code section} element containing a summary of
224     * the packages provided by a module,
225     * <i>and</i>
226     * the class for the list of packages on the "All Packages" index page.
227     */
228    packagesSummary,
229
230    /**
231     * The class for the {@code section} element containing a summary of
232     * the properties for a type.
233     */
234    propertySummary,
235
236    /**
237     * The class for the {@code section} element containing a summary of
238     * the services provided or used by a module.
239     */
240    servicesSummary,
241
242    /**
243     * The class for a {@code section} element on the "Constants Field Values" page,
244     * <i>and</i>
245     * the class for the {@code section} element for the enum constants of an enum class.
246     */
247    constantsSummary,
248
249    /**
250     * The class for a {@code ul} element in various summary pages containing links to the
251     * contents of the page.
252     */
253    contentsList,
254
255    /**
256     * The class for a {@code ul} element in the preview summary page containing information
257     * about the preview features in the current release.
258     */
259    previewFeatureList,
260
261    //</editor-fold>
262
263    //<editor-fold desc="details">
264    //
265    // The following constants are used for the details of the enclosed
266    // (program) elements of an enclosing element, such as a module,
267    // package or type declaration.
268
269    /**
270     * The class for the overall {@code section} element for all the details
271     * about enclosed program elements.
272     */
273    details,
274
275    /**
276     * The class for the list of sublists containing the details for
277     * the different kinds of program elements.
278     */
279    detailsList,
280
281    /**
282     * The class for the {@code section} element containing the details
283     * for a single enclosed element.
284     */
285    detail,
286
287    /**
288     * The class for the list containing the details for the members
289     * of a given element kind.
290     */
291    memberList,
292
293    /**
294     * The class for the {@code section} containing the list of details for
295     * all the constructors declared in a type element.
296     */
297    constructorDetails,
298
299    /**
300     * The class for the {@code section} containing the list of details for
301     * all the enum constants declared in a enum element.
302     */
303    constantDetails,
304
305    /**
306     * The class for the {@code section} containing the list of details for
307     * all the fields declared in a type element.
308     */
309    fieldDetails,
310
311    /**
312     * The class for the {@code section} containing the list of details for
313     * all the members declared in a annotation type element.
314     */
315    memberDetails,
316
317    /**
318     * The class for the {@code section} containing the list of details for
319     * all the methods declared in a type element.
320     */
321    methodDetails,
322
323    /**
324     * The class for the {@code section} containing the list of details for
325     * all the properties declared in a JavaFX type element.
326     */
327    propertyDetails,
328
329    /**
330     * The class for a {@code section} element containing details of the
331     * serialized form of an element, on the "Serialized Form" page.
332     */
333    serializedClassDetails,
334
335    //</editor-fold>
336
337    //<editor-fold desc="additional details">
338    //
339    // The following constants are used for the additional information that may be provided
340    // for a declaration, such as whether it is deprecated or is a "preview" feature.
341
342    /**
343     * The class for the "Deprecated" label in a block describing the "deprecated" status
344     * of a declaration.
345     */
346    deprecatedLabel,
347
348    /**
349     * The class for a block describing the "deprecated" status of a declaration.
350     */
351    deprecationBlock,
352
353    /**
354     * The class for the details in a block describing the "deprecated" status of a declaration.
355     */
356    deprecationComment,
357
358    /**
359     * The class for a label indicating the element from which a description has been copied.
360     */
361    descriptionFromTypeLabel,
362
363    /**
364     * The class for a note providing information about the permitted subtypes of a
365     * sealed class.
366     */
367    permitsNote,
368
369    /**
370     * The class for a block describing the "preview" status of a declaration.
371     */
372    previewBlock,
373
374    /**
375     * The class for the details in a block describing the "preview" status of a declaration.
376     */
377    previewComment,
378
379    /**
380     * The class for the "Preview" label in a block describing the "preview" status
381     * of a declaration.
382     */
383    previewLabel,
384
385    /**
386     * The class for a list containing the tags of an element.
387     */
388    tagList,
389
390    /**
391     * The class for a list containing the tags of an element
392     * when some tags have longer labels or contain commas.
393     */
394    tagListLong,
395
396    //</editor-fold>
397
398    //<editor-fold desc="tables">
399    //
400    // The following constants are used for "summary" and "details" tables.
401    // Most tables are summary tables, meaning that, in part, they provide links to details elsewhere.
402    // A module page has details tables containing the details of the directives.
403
404    /**
405     * The class of a {@code div} element whose content should be rendered as a table
406     * with two columns.
407     */
408    twoColumnSummary,
409
410    /**
411     * The class of a {@code div} element whose content should be rendered as a table
412     * with three columns.
413     */
414    threeColumnSummary,
415
416    /**
417     * The class of a {@code div} element whose content should be rendered as a table
418     * with three columns where the middle column requires less space as it only contains
419     * a release name.
420     */
421    threeColumnReleaseSummary,
422
423    /**
424     * The class of a {@code div} element whose content should be rendered as a table
425     * with four columns.
426     */
427    fourColumnSummary,
428
429    /**
430     * The class of a {@code div} element used to present details of a program element.
431     */
432    detailsTable,
433
434    /**
435     * The class of a {@code div} element used to present a summary of the enclosed
436     * elements of a program element.  A {@code summaryTable} typically references
437     * items in a corresponding {@link #detailsList}.
438     */
439    summaryTable,
440
441    /**
442     * The class of the "tab" that indicates the currently displayed contents of a table.
443     * This is used when the table provides filtered views.
444     */
445    activeTableTab,
446
447    /**
448     * The class for the caption of a table. The caption is displayed as a single
449     * inactive tab above the table.
450     */
451    caption,
452
453    /**
454     * The class for a {@code div} element containing a row of checkboxes to select
455     * items to view in summary tables.
456     */
457    checkboxes,
458
459    /**
460     * The class of an element that is part of a table header.
461     */
462    tableHeader,
463
464    /**
465     * The class of a "tab" that indicates an alternate view of the contents of a table.
466     * This is used when the table provides filtered views.
467     */
468    tableTab,
469
470    /**
471     * The class of the {@code div} element that contains the tabs used to select
472     * the contents of the associated table to be displayed.
473     */
474    tableTabs,
475
476    /**
477     * The class of the cells in a table column used to display the name
478     * of a constructor.
479     */
480    colConstructorName,
481
482    /**
483     * The class of the first column of cells in a table.
484     * This is typically the "type and modifiers" column, where the type is
485     * the type of a field or the return type of a method.
486     */
487    colFirst,
488
489    /**
490     * The class of the last column of cells in a table.
491     * This is typically the "description" column, where the description is
492     * the first sentence of the elements documentation comment.
493     */
494    colLast,
495
496    /**
497     * The class of the cells in a table column used to display the name
498     * of a summary item.
499     */
500    colSummaryItemName,
501
502    /**
503     * The class of the cells in a table column used to display additional
504     * information without any particular style.
505     */
506    colPlain,
507
508    /**
509     * The class of the second column of cells in a table.
510     * This is typically the column that defines the name of a field or the
511     * name and parameters of a method.
512     */
513    colSecond,
514
515    /**
516     * A class used to provide the background for the rows of a table,
517     * to provide a "striped" effect. This class and {@link #oddRowColor}
518     * are used on alternating rows.
519     * The classes are applied dynamically when table "tabs" are used
520     * to filter the set of rows to be displayed
521     */
522    evenRowColor,
523
524    /**
525     * A class used to provide the background for the rows of a table,
526     * to provide a "striped" effect. This class and {@link #evenRowColor}
527     * are used on alternating rows.
528     * The classes are applied dynamically when table "tabs" are used
529     * to filter the set of rows to be displayed
530     */
531    oddRowColor,
532    //</editor-fold>
533
534    //<editor-fold desc="documentation comments">
535    //
536    // The following constants are used for the components used to present the content
537    // generated from documentation comments.
538
539    /**
540     * The class of the element used to present the documentation comment for a type element.
541     * The content of the block tags will be in a nested element with class {@link #notes}.
542     */
543    classDescription,
544
545    /**
546     * The class of the element used to present the documentation comment for a module element,
547     * excluding block tags.
548     */
549    moduleDescription,
550
551    /**
552     * The class of the element used to present the documentation comment for package element.
553     * The content of the block tags will be in a nested element with class {@link #notes}.
554     */
555    packageDescription,
556
557    /**
558     * The class of the {@code dl} element used to present the block tags in the documentation
559     * comment for a package, type or member element.
560     * Additional (derived) information, such as implementation or inheritance details, may
561     * also appear in this element.
562     */
563    notes,
564    //</editor-fold>
565
566    //<editor-fold desc="flex layout">
567    //
568    // The following constants are used for the components of the top-level structures for "flex" layout.
569
570    /**
571     * The class of the top-level {@code div} element used to arrange for "flex" layout in
572     * a browser window. The element should contain two child elements: one with class
573     * {@link #flexHeader flex-header} and one with class {@link #flexContent flex-content}.
574     */
575    flexBox,
576
577    /**
578     * The class of the {@code header} element within a {@link #flexBox flex-box} container.
579     * The element is always displayed at the top of the viewport.
580     */
581    flexHeader,
582
583    /**
584     * The class of the {@code div} element within a {@link #flexBox flex-box} container
585     * This element appears below the header and can be scrolled if too big for the available height.
586     */
587    flexContent,
588    //</editor-fold>
589
590    //<editor-fold desc="signatures">
591    //
592    // The following constants are used for the components of a signature of an element
593
594    /**
595     * The class of an element containing a module signature.
596     */
597    moduleSignature,
598
599    /**
600     * The class of an element containing a package signature.
601     */
602    packageSignature,
603
604    /**
605     * The class of a {@code span} element containing the type name in a
606     * type signature.
607     */
608    typeNameLabel,
609
610    /**
611     * The class of an element containing a type signature.
612     */
613    typeSignature,
614
615    /**
616     * The class of an element containing a member signature.
617     * The signature will contain a member name and, depending on the kind of element,
618     * any of the following:
619     * annotations, type parameters, modifiers, return type, parameters, and exceptions.
620     */
621    memberSignature,
622
623    /**
624     * The class of a {@code span} element containing any annotations in the signature of an element.
625     */
626    annotations,
627
628    /**
629     * The class of a {@code span} element containing any exceptions in a signature of an executable element.
630     */
631    exceptions,
632
633    /**
634     * The class of a {@code span} element containing the {@code extends} or {@code implements} section
635     * in a signature of a type element.
636     */
637    extendsImplements,
638
639    /**
640     * The class of a {@code span} containing the element name in the element's signature.
641     */
642    elementName,
643
644    /**
645     * The class of a {@code span} containing any modifiers in the signature of an element.
646     */
647    modifiers,
648
649    /**
650     * The class of a {@code span} containing any parameters in the signature of an executable element.
651     */
652    parameters,
653
654    /**
655     * The class of a {@code span} containing the {@code permits} section of a sealed class element.
656     */
657    permits,
658
659    /**
660     * The class of a {@code span} containing the return type in the signature of a method element.
661     */
662    returnType,
663
664    /**
665     * The class of a {@code span} containing type parameters in the signature of an element,
666     * used when the type parameters should reasonably be displayed inline.
667     */
668    typeParameters,
669
670    /**
671     * The class of a {@code span} containing type parameters in the signature of an element,
672     * used when the type parameters are too long to be displayed inline.
673     * @implNote
674     * The threshold for choosing between {@code typeParameters} and {@code typeParametersLong}
675     * is 50 characters.
676     */
677    typeParametersLong,
678    //</editor-fold>
679
680    //<editor-fold desc="search index and results">
681    //
682    // The following constants are used for items in the static and interactive search indexes.
683
684    /**
685     * The class for a {@code details} element in the search page to show additional information.
686     */
687    pageSearchDetails,
688
689    /**
690     * The class for a {@code div} element in the search page which contains additional information.
691     */
692    pageSearchInfo,
693
694    /**
695     * The class for a link in the static "Index" pages to a custom searchable item,
696     * such as defined with an {@code @index} tag.
697     */
698    searchTagLink,
699
700    /**
701     * The class for a custom searchable item,
702     * such as defined with an {@code @index} tag.
703     */
704    searchTagResult,
705
706    /**
707     * The class for the separator in the list of pages given at the top of the
708     * static "Index" page(s).
709     */
710    verticalSeparator,
711
712    //</editor-fold>
713
714    //<editor-fold desc="page styles for <body> elements">
715    //
716    // The following constants are used for the class of the {@code <body>} element
717    // for the corresponding pages.
718
719    /**
720     * The class of the {@code body} element for the "All Classes" index page.
721     */
722    allClassesIndexPage,
723
724    /**
725     * The class of the {@code body} element for the "All Packages" index page.
726     */
727    allPackagesIndexPage,
728
729    /**
730     * The class of the {@code body} element for a class-declaration page.
731     */
732    classDeclarationPage,
733
734    /**
735     * The class of the {@code body} element for a class-use page.
736     */
737    classUsePage,
738
739    /**
740     * The class of the {@code body} element for the constants-summary page.
741     */
742    constantsSummaryPage,
743
744    /**
745     * The class of the {@code body} element for the page listing any deprecated items.
746     */
747    deprecatedListPage,
748
749    /**
750     * The class of the {@code body} element for the page listing any deprecated items.
751     */
752    deprecatedInReleasePage,
753
754    /**
755     * The class of the {@code body} element for a "doc-file" page..
756     */
757    docFilePage,
758
759    /**
760     * The class of the {@code body} element for the "external specifications" page.
761     */
762    externalSpecsPage,
763
764    /**
765     * The class of the {@code body} element for the "help" page.
766     */
767    helpPage,
768
769    /**
770     * The class of the {@code body} element for a page in either the "single" or "split index".
771     */
772    indexPage,
773
774    /**
775     * The class of the {@code body} element for the top-level redirect page.
776     */
777    indexRedirectPage,
778
779    /**
780     * The class of the {@code body} element for a module-declaration page.
781     */
782    moduleDeclarationPage,
783
784    /**
785     * The class of the {@code body} element for the module-index page.
786     */
787    moduleIndexPage,
788
789    /**
790     * The class of the {@code body} element for the page listing new API elements.
791     */
792    newApiListPage,
793
794    /**
795     * The class of the {@code body} element for a package-declaration page.
796     */
797    packageDeclarationPage,
798
799    /**
800     * The class of the {@code body} element for the package-index page.
801     */
802    packageIndexPage,
803
804    /**
805     * The class of the {@code body} element for the page for the package hierarchy.
806     */
807    packageTreePage,
808
809    /**
810     * The class of the {@code body} element for a package-use page.
811     */
812    packageUsePage,
813
814    /**
815     * The class of the {@code body} element for the page listing any preview items.
816     */
817    previewListPage,
818
819    /**
820     * The class of the {@code body} element for the search page.
821     */
822    searchPage,
823
824    /**
825     * The class of the {@code body} element for the serialized-forms page.
826     */
827    serializedFormPage,
828
829    /**
830     * The class of the {@code body} element for a page with the source code for a class.
831     */
832    sourcePage,
833
834    /**
835     * The class of the {@code body} element for the system-properties page.
836     */
837    systemPropertiesPage,
838
839    /**
840     * The class of the {@code body} element for the page for the class hierarchy.
841     */
842    treePage,
843
844    //</editor-fold>
845
846    //<editor-fold desc="help page">
847    //
848    // The following constants are used for the contents of the "Help" page.
849
850    /**
851     * The class of the footnote at the bottom of the page.
852     */
853    helpFootnote,
854
855    /**
856     * The class of the "Note:" prefix.
857     */
858    helpNote,
859
860    /**
861     * The class of each subsection in the page.
862     */
863    helpSection,
864
865    /**
866     * The class of lists in a subsection in the page.
867     */
868    helpSectionList,
869
870    /**
871     * The class of the top level list for the table of contents for the page.
872     */
873    helpTOC("help-toc"),
874
875    /**
876     * The class of the second-level lists in the table of contents for the page.
877     */
878    helpSubTOC("help-subtoc"),
879
880    //</editor-fold>
881
882    //<editor-fold desc="snippets">
883    //
884    // The following constants are used for the contents of snippets.
885    // In addition, the translation of a snippet may use the class
886    // {@code language-LANG} where LANG is either specified explicitly
887    // by the "lang" attribute in a snippet tag, or can be inferred
888    // from the kind of an external snippet.
889
890    /**
891     * The class of the {@code pre} element presenting a snippet.
892     */
893    snippet,
894
895    /**
896     * The class of the {@code div} element containing a snippet element.
897     */
898    snippetContainer,
899
900    /**
901     * The class of the UI element to copy snippet content to the clipboard.
902     */
903    snippetCopy,
904
905    /**
906     * The class of text highlighted with the type {@code bold}.
907     */
908    bold,
909
910    /**
911     * The class of text highlighted with the type {@code italic}.
912     */
913    italic,
914
915    /**
916     * The class of text highlighted with the type {@code highlighted}.
917     */
918    highlighted,
919
920    //</editor-fold>
921
922    //<editor-fold desc="miscellaneous">
923    //
924    // The following constants are used in various places across a variety of pages.
925
926    /**
927     * The class of a {@code div} element containing part of a documentation comment.
928     */
929    block,
930
931    /**
932     * The class of a {@code ul} element containing parts of documentation comments.
933     */
934    blockList,
935
936    /**
937     * The class of a {@code ul} element in the hierarchical tree view.
938     */
939    circle,
940
941    /**
942     * The class of a {@code ul} element listing classes in the uses page.
943     */
944    classUses,
945
946    /**
947     * The class for a {@code button} element to copy some page content to the clipboard.
948     */
949    copy,
950
951    /**
952     * The class of an {@code a} element for a link with an external target.
953     */
954    externalLink,
955
956    /**
957     * The class of a {@code section} element containing a hierarchical
958     * tree view.
959     */
960    hierarchy,
961
962    /**
963     * The class of a {@code ul} element with horizontal (inline) display style.
964     */
965    horizontal,
966
967    /**
968     * The class of a {@code span} element containing implementation details of
969     * a "provides" entry in a module page.
970     */
971    implementationLabel,
972
973    /**
974     * The class of a {@code dl} element in the body of index pages.
975     */
976    index,
977
978    /**
979     * The class of a {@code div} element containing the inheritance tree of
980     * a class page.
981     */
982    inheritance,
983
984    /**
985     * The class of a {@code div} element containing a summary of inherited
986     * members in the class page.
987     */
988    inheritedList,
989
990    /**
991     * The class of an element that acts as a notification for an invalid tag
992     * or other invalid items.
993     */
994    invalidTag,
995
996    /**
997     * The class of a {@code p} element containing legal copy in the page footer.
998     */
999    legalCopy,
1000
1001    /**
1002     * The class of an {@code a} element for a link in member summary lists.
1003     */
1004    memberNameLink,
1005
1006    /**
1007     * The class of a {@code dl} element containing serial UID information in
1008     * the serialized form page.
1009     */
1010    nameValue,
1011
1012    /**
1013     * The class of a {@code section} element containing the packages section
1014     * in the constant field values page.
1015     */
1016    packages,
1017
1018    /**
1019     * The class of a {@code span} element containing the package hierarchy
1020     * label in the tree page.
1021     */
1022    packageHierarchyLabel,
1023
1024    /**
1025     * The class of a {@code li} element containing a content section of
1026     * the package uses page.
1027     */
1028    packageUses,
1029
1030    /**
1031     * The class for the list of references to an external specification.
1032     */
1033    refList,
1034
1035    /**
1036     * The class of a {@code section} element for a package in the serialized
1037     * form page.
1038     */
1039    serializedPackageContainer,
1040
1041    /**
1042     * The class of a {@code div} element containing source code in the
1043     * source page.
1044     */
1045    sourceContainer,
1046
1047    /**
1048     * The class of a {@code span} element containing a line number in the
1049     * source page.
1050     */
1051    sourceLineNo,
1052
1053    /**
1054     * The class of an {@code a} element for a link to a class or interface.
1055     */
1056    typeNameLink;
1057
1058    //</editor-fold>
1059
1060    private final String cssName;
1061
1062    HtmlStyle() {
1063        cssName = Pattern.compile("\\p{Upper}")
1064                .matcher(toString())
1065                .replaceAll(mr -> "-" + mr.group().toLowerCase(Locale.US));
1066    }
1067
1068    HtmlStyle(String cssName) {
1069        this.cssName = cssName;
1070    }
1071
1072    /**
1073     * Returns the CSS class name associated with this style.
1074     * @return the CSS class name
1075     */
1076    public String cssName() {
1077        return cssName;
1078    }
1079}