diff --git a/core/modules/filters/x-listops.js b/core/modules/filters/x-listops.js index 760f581a1..ae17297a5 100644 --- a/core/modules/filters/x-listops.js +++ b/core/modules/filters/x-listops.js @@ -202,7 +202,7 @@ Extended filter operators to manipulate the current list. } if(resultsIndex !== -1) { i = i + step; - nextOperandIndex = (i < opLength ? i : i - opLength); + nextOperandIndex = (i < opLength ? i : i % opLength); if(operands.length > 1) { results.splice(resultsIndex,1,operands[nextOperandIndex]); } else { diff --git a/core/modules/startup/render.js b/core/modules/startup/render.js index e50512463..caa8db2ef 100644 --- a/core/modules/startup/render.js +++ b/core/modules/startup/render.js @@ -81,6 +81,8 @@ exports.startup = function() { deferredChanges = Object.create(null); $tw.hooks.invokeHook("th-page-refreshed"); } + var throttledRefresh = $tw.perf.report("throttledRefresh",refresh); + // Add the change event handler $tw.wiki.addEventListener("change",$tw.perf.report("mainRefresh",function(changes) { // Check if only tiddlers that are throttled have changed @@ -101,7 +103,7 @@ exports.startup = function() { if(isNaN(timeout)) { timeout = THROTTLE_REFRESH_TIMEOUT; } - timerId = setTimeout(refresh,timeout); + timerId = setTimeout(throttledRefresh,timeout); $tw.utils.extend(deferredChanges,changes); } else { $tw.utils.extend(deferredChanges,changes); diff --git a/core/modules/startup/windows.js b/core/modules/startup/windows.js index aa9f982ed..34f45d7a5 100644 --- a/core/modules/startup/windows.js +++ b/core/modules/startup/windows.js @@ -56,7 +56,7 @@ exports.startup = function() { return; } // Initialise the document - srcDocument.write(""); + srcDocument.write(""); srcDocument.close(); srcDocument.title = windowTitle; srcWindow.addEventListener("beforeunload",function(event) { diff --git a/core/ui/KeyboardShortcuts/refresh.tid b/core/ui/KeyboardShortcuts/refresh.tid new file mode 100644 index 000000000..6776c9d73 --- /dev/null +++ b/core/ui/KeyboardShortcuts/refresh.tid @@ -0,0 +1,5 @@ +title: $:/core/ui/KeyboardShortcuts/refresh +tags: $:/tags/KeyboardShortcut +key: ((refresh)) + +<$action-sendmessage $message="tm-browser-refresh"/> diff --git a/core/ui/PageControls.tid b/core/ui/PageControls.tid index 2b579050c..833b4cbcb 100644 --- a/core/ui/PageControls.tid +++ b/core/ui/PageControls.tid @@ -1,16 +1,14 @@ title: $:/core/ui/PageTemplate/pagecontrols \whitespace trim -\define config-title() $:/config/PageControlButtons/Visibility/$(listItem)$ +\function config-title() [[$:/config/PageControlButtons/Visibility/$(listItem)$]substitute[]]
<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]" variable="listItem"> - <$set name="hidden" value=<>> - <$list filter="[!text[hide]]" storyview="pop" variable="ignore"> - <$set name="tv-config-toolbar-class" filter="[] [encodeuricomponent[]addprefix[tc-btn-]]"> - <$transclude tiddler=<> mode="inline"/> - - - + <$list filter="[!text[hide]]" storyview="pop" variable="ignore"> + <$let tv-config-toolbar-class={{{ [enlist] [encodeuricomponent[]addprefix[tc-btn-]] +[join[ ]] }}}> + <$transclude $tiddler=<> $mode="inline"/> + + -
+ \ No newline at end of file diff --git a/core/wiki/config/ShortcutInfo.multids b/core/wiki/config/ShortcutInfo.multids index 1f903dcad..bebd02dea 100644 --- a/core/wiki/config/ShortcutInfo.multids +++ b/core/wiki/config/ShortcutInfo.multids @@ -35,6 +35,7 @@ new-tiddler: {{$:/language/Buttons/NewTiddler/Hint}} picture: {{$:/language/Buttons/Picture/Hint}} preview: {{$:/language/Buttons/Preview/Hint}} quote: {{$:/language/Buttons/Quote/Hint}} +refresh: {{$:/language/Buttons/Refresh/Hint}} save-tiddler: {{$:/language/Buttons/Save/Hint}} save-wiki: {{$:/language/Buttons/SaveWiki/Hint}} sidebar-search: {{$:/language/Buttons/SidebarSearch/Hint}} diff --git a/core/wiki/config/shortcuts/shortcuts-mac.multids b/core/wiki/config/shortcuts/shortcuts-mac.multids index fc3fc060f..bc7e50fda 100644 --- a/core/wiki/config/shortcuts/shortcuts-mac.multids +++ b/core/wiki/config/shortcuts/shortcuts-mac.multids @@ -6,4 +6,5 @@ underline: meta-U new-image: ctrl-I new-journal: ctrl-J new-tiddler: ctrl-N +refresh: meta-R save-wiki: meta-S diff --git a/core/wiki/config/shortcuts/shortcuts-not-mac.multids b/core/wiki/config/shortcuts/shortcuts-not-mac.multids index a50563f2d..272169552 100644 --- a/core/wiki/config/shortcuts/shortcuts-not-mac.multids +++ b/core/wiki/config/shortcuts/shortcuts-not-mac.multids @@ -6,3 +6,4 @@ underline: ctrl-U new-image: alt-I new-journal: alt-J new-tiddler: alt-N +refresh: ctrl-R diff --git a/core/wiki/macros/tag-picker.tid b/core/wiki/macros/tag-picker.tid index 80086e4d3..4618285be 100644 --- a/core/wiki/macros/tag-picker.tid +++ b/core/wiki/macros/tag-picker.tid @@ -1,167 +1,182 @@ title: $:/core/macros/tag-picker -tags: $:/tags/Macro $:/tags/Global -first-search-filter: [tags[]!is[system]search:titlesort[]] -second-search-filter: [tags[]is[system]search:titlesort[]] +tags: tags: $:/tags/Macro $:/tags/Global +first-search-filter: [subfilter!is[system]search:titlesort[]] +second-search-filter: [subfilteris[system]search:titlesort[]] -\procedure get-tagpicker-focus-selector() -\function currentTiddlerCSSEscaped() [escapecss[]] -[data-tiddler-title=`$(currentTiddlerCSSEscaped)$`] .tc-add-tag-name input + + +\whitespace trim + + +\function tf.tagpicker-dropdown-id() + [] + [[$(saveTiddler)$-[$(tagField)$-$(tagListFilter)$]substitute[]sha256[]] +[join[/]] \end -\procedure delete-tag-state-tiddlers() <$action-deletetiddler $filter="[] [] []"/> +\function tf.tagpicker-dropdown-class() [sha256[]addprefix[tc-]] +\function tf.get-tagpicker-focus-selector() [addprefix[.]] .tc-popup-handle +[join[ ]] + + +\procedure delete-tag-state-tiddlers() +<$action-deletetiddler $filter="[] [] []"/> +\end + + \procedure add-tag-actions() -\whitespace trim -<$let tag=<>> -<$action-listops $tiddler=<> $field=<> $subfilter='+[toggletrim[]]'/> -<$list - filter="[] :intersection[getenlist-input[]]" - variable="ignore" - emptyMessage="<>" -/> - -<> -<$action-setfield $tiddler=<> text="yes"/> -\end - -\procedure clear-tags-actions-inner() -\whitespace trim -<$list - filter="[has[text]] ~[has[text]]" - variable="ignore" - emptyMessage="<>" -> +<$let tag=<<_tf.getTag>> > + <$action-listops $tiddler=<> $field=<> $subfilter='+[toggletrim[]]'/> + <% if [] :intersection[getenlist-input[]] %> + + <% else %> + <> + <% endif %> <> - + <$action-setfield $tiddler=<> text="yes"/> + +\end + + + +\procedure clear-tags-actions-inner() +<% if [has[text]] ~[has[text]] %> + <> +<% else %> + <> +<% endif %> \end + \procedure clear-tags-actions() -\whitespace trim -<$let userInput=<>> - <$list - filter="[get[text]!match]" - emptyMessage="<>" - > +<$let userInput=<<_tf.getUserInput>> > + + <$list filter="[get[text]!match]" > + <$list-empty> + <> + <$action-setfield $tiddler=<> text=<>/> <$action-setfield $tiddler=<> text="yes"/> \end + \procedure add-button-actions() <$action-listops $tiddler=<> $field=<> $subfilter="[trim[]]"/> <> <> -<$action-sendmessage $message="tm-focus-selector" $param=<>/> +<$action-sendmessage $message="tm-focus-selector" $param=<>/> \end + -\procedure list-tags(filter, suffix) -\whitespace trim -<$list - filter="[minlength{$:/config/Tags/MinLength}limit[1]]" - emptyMessage="
{{$:/language/Search/Search/TooShort}}
" variable="listItem" -> - <$list filter=<> variable="tag"> - <$let - button-classes=`tc-btn-invisible ${ [addsuffix] -[get[text]] :then[[]] ~tc-tag-button-selected }$` - currentTiddler=<> - > - {{||$:/core/ui/TagPickerTagTemplate}} - + +\procedure tag-picker-listTags(filter, suffix) +<$let userInput=<<_tf.getUserInput>> > + <$list filter="[minlength{$:/config/Tags/MinLength}limit[1]]" + emptyMessage="
{{$:/language/Search/Search/TooShort}}
" variable="listItem" + > + <$list filter=<> variable="tag"> + + + <$let currentTiddler=<> + button-classes=`tc-btn-invisible ${[addsuffix] -[get[text]] :then[[]] ~tc-tag-button-selected }$` + get-tagpicker-focus-selector=`${[]}$` + > + {{||$:/core/ui/TagPickerTagTemplate}} + + - + \end + \procedure tag-picker-inner() -\whitespace trim +
] +[join[ ]] }}}> +
+ + <$macrocall $name="keyboard-driven-input" + tiddler=<> + storeTitle=<> + refreshTitle=<> + selectionStateTitle=<> + inputAcceptActions=<> + inputCancelActions=<> + tag="input" + placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}} + focusPopup=<> + class="tc-edit-texteditor tc-popup-handle" + tabindex=<> + focus={{{ [{$:/config/AutoFocus}match[tags]then[true]] ~[[false]] }}} + filterMinLength={{$:/config/Tags/MinLength}} + cancelPopups=<> + configTiddlerFilter="[[$:/core/macros/tag-picker]]" + /> + + <$button popup=<> class="tc-btn-invisible tc-btn-dropdown" + tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}} + > + {{$:/core/images/down-arrow}} + + <% if [has[text]] %> + <$button actions=<> class="tc-btn-invisible tc-small-gap tc-btn-dropdown" + tooltip={{$:/language/EditTemplate/Tags/ClearInput/Hint}} aria-label={{$:/language/EditTemplate/Tags/ClearInput/Caption}} + > + {{$:/core/images/close-button}} + + <% endif %> + + <$let tag=<<_tf.getTag>>> + <$button set=<> actions=<> > + {{$:/language/EditTemplate/Tags/Add/Button}} + + + +
+
+ <% if [has[text]] %> +
+ <$macrocall $name="tag-picker-listTags" filter=<> suffix="-primaryList" /> +
+ <$macrocall $name="tag-picker-listTags" filter=<> suffix="-secondaryList" /> +
+ <% endif %> +
+
+\end + + +\procedure tag-picker(actions, tagField:"tags", tiddler, tagListFilter:"[tags[]]") + +\function _tf.getUserInput() [get[text]] +\function _tf.getTag() [get[text]] + + <$let - newTagNameInputTiddlerQualified=<> - newTagNameSelectionTiddlerQualified=<> - fallbackTarget={{{ [getindex[tag-background]] }}} + palette={{$:/palette}} colourA={{{ [getindex[foreground]] }}} colourB={{{ [getindex[background]] }}} + fallbackTarget={{{ [getindex[tag-background]] }}} - storeTitle={{{ [!match[]] ~[] }}} + saveTiddler={{{ [is[blank]thenelse] }}} + + newTagNameTiddler={{{ [[$:/temp/NewTagName]] [!match[tags]] +[join[/]] [] +[join[]] }}} + storeTitle={{{ [[$:/temp/NewTagName/input]] [!match[tags]] +[join[/]] [] +[join[]] }}} + + newTagNameSelectionTiddlerQualified=<> tagSelectionState={{{ [!match[]] ~[] }}} - tagAutoComplete=<> - refreshTitle=<> - nonSystemTagsFilter="[tags[]!is[system]search:titlesort[]]" - systemTagsFilter="[tags[]is[system]search:titlesort[]]" -> -
-
- - <$transclude - $variable="keyboard-driven-input" - tiddler=<> - storeTitle=<> - refreshTitle=<> - selectionStateTitle=<> - inputAcceptActions=<> - inputCancelActions=<> - tag="input" - placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}} - focusPopup=<> - class="tc-edit-texteditor tc-popup-handle" - tabindex=<> - focus={{{ [{$:/config/AutoFocus}match[tags]then[true]] ~[[false]] }}} - filterMinLength={{$:/config/Tags/MinLength}} - cancelPopups=<> - configTiddlerFilter="[[$:/core/macros/tag-picker]]" - /> - - <$button popup=<> - class="tc-btn-invisible tc-btn-dropdown" - tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} - aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}} - > - {{$:/core/images/down-arrow}} - - <$reveal state=<> type="nomatch" text=""> - <$button actions=<> - class="tc-btn-invisible tc-small-gap tc-btn-dropdown" - tooltip={{$:/language/EditTemplate/Tags/ClearInput/Hint}} - aria-label={{$:/language/EditTemplate/Tags/ClearInput/Caption}} - > - {{$:/core/images/close-button}} - - - - <$let tag=<>> - <$button set=<> setTo="" - actions=<> - > - {{$:/language/EditTemplate/Tags/Add/Button}} - - - -
-
- <$reveal state=<> type="nomatch" text=""> -
- <$let userInput=<>> - <$transclude $variable="list-tags" filter=<> suffix="-primaryList" /> -
- <$transclude $variable="list-tags" filter=<> suffix="-secondaryList" /> - -
- -
-
- -\end + refreshTitle=<> -\procedure tag-picker(actions, tagField:"tags") -\function userInput() [get[text]] -\function tag() [get[text]] -\whitespace trim -<$let - saveTiddler=<> - palette={{$:/palette}} - qualified=<> - newTagNameTiddler={{{ [!match[]] ~[] }}} + nonSystemTagsFilter="[subfilter!is[system]search:titlesort[]]" + systemTagsFilter="[subfilteris[system]search:titlesort[]]" + + cancelPopups="yes" > - <$transclude $variable="tag-picker-inner" /> + <$macrocall $name="tag-picker-inner"/> -\end +\end \ No newline at end of file diff --git a/core/wiki/macros/tag.tid b/core/wiki/macros/tag.tid index 0dfe8e52a..eedbd0c4c 100644 --- a/core/wiki/macros/tag.tid +++ b/core/wiki/macros/tag.tid @@ -21,7 +21,9 @@ color:$(foregroundColor)$; > <<__actions__>> <$transclude tiddler=<<__icon__>>/> - <$view tiddler=<<__tag__>> field="title" format="text" /> + is[missing]then[tc-tag-missing]else[tc-tag-exists]] }}}> + <$view tiddler=<<__tag__>> field="title" format="text" /> + \end diff --git a/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params-draft-exists.tid b/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params-draft-exists.tid new file mode 100644 index 000000000..10cff1ef9 --- /dev/null +++ b/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params-draft-exists.tid @@ -0,0 +1,27 @@ +title: Macros/unusedtitle/basic-draft-exists +description: test <> with basic macro parameters but they are empty +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Draft of 'test' +draft.of: test +draft.title: test + ++ +title: Draft of 'asdf 0' +draft.of: asdf 0 +draft.title: asdf 0 + ++ +title: Output + + +<> + + +<> + ++ +title: ExpectedResult + +

test 1

asdf 1

\ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params-empty-tiddler-exists.tid b/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params-empty-tiddler-exists.tid new file mode 100644 index 000000000..7cf80fd20 --- /dev/null +++ b/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params-empty-tiddler-exists.tid @@ -0,0 +1,23 @@ +title: Macros/unusedtitle/basic-params-empty-tiddler-exists +description: test <> with basic macro parameters but they are empty +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: New Tiddler + ++ +title: Output + + +<> + + +<> + + +<> + ++ +title: ExpectedResult + +

New Tiddler 1

New Tiddler 1

New Tiddler 1

\ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params-empty.tid b/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params-empty.tid new file mode 100644 index 000000000..990f88623 --- /dev/null +++ b/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params-empty.tid @@ -0,0 +1,20 @@ +title: Macros/unusedtitle/basic-params-empty +description: test <> with basic macro parameters but they are empty +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + + +<> + + +<> + + +<> + ++ +title: ExpectedResult + +

New Tiddler

New Tiddler

New Tiddler

\ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params-tiddlers-exist.tid b/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params-tiddlers-exist.tid new file mode 100644 index 000000000..a01f1262d --- /dev/null +++ b/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params-tiddlers-exist.tid @@ -0,0 +1,28 @@ +title: Macros/unusedtitle/basic-params-tiddlers-exist +description: test <> with basic macro parameters, where new-name tiddlers already exist +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: New Tiddler + ++ +title: anotherBase + ++ +title: About + ++ +title: Output + +<> + +<> + +<> + +<> + ++ +title: ExpectedResult + +

New Tiddler 1

New Tiddler-1

anotherBase 1

About-1

\ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params.tid b/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params.tid new file mode 100644 index 000000000..5e1ae482d --- /dev/null +++ b/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params.tid @@ -0,0 +1,20 @@ +title: Macros/unusedtitle/basic-params +description: test <> with basic macro parameters +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +<> + + +<> + +<> + +<> + ++ +title: ExpectedResult + +

New Tiddler

New Tiddler

anotherBase

About

\ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/macros/unusedtitle/template-empty-params-tiddler-exist.tid b/editions/test/tiddlers/tests/data/macros/unusedtitle/template-empty-params-tiddler-exist.tid new file mode 100644 index 000000000..66ff810b1 --- /dev/null +++ b/editions/test/tiddlers/tests/data/macros/unusedtitle/template-empty-params-tiddler-exist.tid @@ -0,0 +1,50 @@ +title: Macros/unusedtitle/template-empty-params-tiddler-exist +description: test <> with templates where parameters are empty +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: New Tiddler + ++ +title: xxx + ++ +title: 00-New Tiddler + ++ +title: 0000 asdf + ++ +title: 0001 asdf + ++ +title: 0000 abc + ++ +title: Output + + +<> + + +<> + +<> + + +<> + + +<> + + ++ +title: ExpectedResult + +

New Tiddler 1

xxx-y-1

01-New Tiddler

0002 asdf

0001 abc

\ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/macros/unusedtitle/template-empty-params.tid b/editions/test/tiddlers/tests/data/macros/unusedtitle/template-empty-params.tid new file mode 100644 index 000000000..bdde68a98 --- /dev/null +++ b/editions/test/tiddlers/tests/data/macros/unusedtitle/template-empty-params.tid @@ -0,0 +1,24 @@ +title: Macros/unusedtitle/template-empty-params +description: test <> with templates where parameters are empty +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + + +<> + + +<> + +<> + +<> + ++ +title: ExpectedResult + +

New Tiddler

xxx

00-New Tiddler

0000 asdf

\ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/macros/unusedtitle/template.tid b/editions/test/tiddlers/tests/data/macros/unusedtitle/template.tid new file mode 100644 index 000000000..66bd0f763 --- /dev/null +++ b/editions/test/tiddlers/tests/data/macros/unusedtitle/template.tid @@ -0,0 +1,28 @@ +title: Macros/unusedtitle/template +description: test <> with templates +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + + +<> + +<> + +<> + + +<> + +<> + + +<> + +<> + ++ +title: ExpectedResult + +

New Tiddler

count-missing

00-new

00-base

00-New Tiddler

00-asdf

00 asdf

\ No newline at end of file diff --git a/editions/tw5.com/tiddlers/macros/TagMacro.tid b/editions/tw5.com/tiddlers/macros/TagMacro.tid index eda75dcb9..f90eb44b7 100644 --- a/editions/tw5.com/tiddlers/macros/TagMacro.tid +++ b/editions/tw5.com/tiddlers/macros/TagMacro.tid @@ -1,6 +1,6 @@ caption: tag created: 20141206130540337 -modified: 20230725201240201 +modified: 20240228131301798 tags: Macros [[Core Macros]] title: tag Macro type: text/vnd.tiddlywiki @@ -11,7 +11,35 @@ The <<.def tag>> [[macro|Macros]] generates a tag pill for a specified tag. Clic !! Parameters -;tag +; tag : The title of the tag, defaulting to the [[current tiddler|Current Tiddler]] +!! CSS classes + +<<.from-version "v5.3.4">> + +; `tc-tag-missing` +: This class is defined if a tag does ''not exist'' as a tiddler. + +; `tc-tag-exists` +: This class is defined if a tag does exist as a tiddler + +!!! Defining the class + +To define the `tc-tag-missing` class a stylesheet tiddler needs to be created. The default font-style for missing tiddler links is //italic//, so it's used for the example code below. Eg: + +''title:'' `myTagsStylesheet`
+''tag:'' `$:/tags/Stylesheet` + +<> +``` +.tc-tag-missing { + font-style: italic; +} +``` + <<.macro-examples "tag">> diff --git a/editions/tw5.com/tiddlers/macros/examples/tag.tid b/editions/tw5.com/tiddlers/macros/examples/tag.tid index 103a5eab7..fbbeffb8e 100644 --- a/editions/tw5.com/tiddlers/macros/examples/tag.tid +++ b/editions/tw5.com/tiddlers/macros/examples/tag.tid @@ -1,5 +1,5 @@ created: 20150221211317000 -modified: 20230725203751870 +modified: 20240228131331605 tags: [[tag Macro]] [[Macro Examples]] title: tag Macro (Examples) type: text/vnd.tiddlywiki @@ -7,22 +7,26 @@ type: text/vnd.tiddlywiki <$macrocall $name=".example" n="1" eg="""<>"""/> <$macrocall $name=".example" n="2" eg="""<>"""/> +The Following tag can be shown with a font-style: //italic// if the corresponding stylesheet exists. See: [[tag Macro]] + +<$macrocall $name=".example" n="3" eg="""<>"""/> + If a [[list widget|ListWidget]] generates multiple tag macros for the same tag, clicking any of them opens dropdowns on all of them, as in the example below. This is usually unwanted. -<$macrocall $name=".example" n="3" eg="""<$list filter="[tag[HelloThere]]"> +<$macrocall $name=".example" n="4" eg="""<$list filter="[tag[HelloThere]]"> * <$link/> is tagged with: <$list filter="[tags[]]"> <> """/> Adding the `counter="transclusion"` attribute to the list widget that generates multiple identical tag macros causes each of them to be identified as a unique one. Clicking on any of them opens only a single dropdown. -<$macrocall $name=".example" n="4" eg="""<$list filter="[tag[HelloThere]]" counter="transclusion"> +<$macrocall $name=".example" n="5" eg="""<$list filter="[tag[HelloThere]]" counter="transclusion"> * <$link/> is tagged with: <$list filter="[tags[]]"> <> """/> A slightly more performant option is to use the `variable="transclusion"` attribute in the list widget. In this case, the variable `<>` has to be used inside the list widget instead of the `<>` . -<$macrocall $name=".example" n="5" eg="""<$list filter="[tag[HelloThere]]" variable="transclusion"> +<$macrocall $name=".example" n="6" eg="""<$list filter="[tag[HelloThere]]" variable="transclusion"> * <$link to=<>/> is tagged with: <$list filter="[tags[]]"> <> diff --git a/editions/tw5.com/tiddlers/macros/tag-picker_Macro.tid b/editions/tw5.com/tiddlers/macros/tag-picker_Macro.tid index bd67256c9..612b9365a 100644 --- a/editions/tw5.com/tiddlers/macros/tag-picker_Macro.tid +++ b/editions/tw5.com/tiddlers/macros/tag-picker_Macro.tid @@ -1,6 +1,6 @@ caption: tag-picker created: 20161128191316701 -modified: 20161128191435641 +modified: 20230616114543787 tags: Macros [[Core Macros]] title: tag-picker Macro type: text/vnd.tiddlywiki @@ -9,9 +9,17 @@ The <<.def tag-picker>> [[macro|Macros]] generates a combination of a text box a !! Parameters -;actions -: Action widgets to be triggered when the pill is clicked. Within the text, the variable ''tag'' contains the title of the selected tag. -;tagField -: <<.from-version 5.1.23>> The ''field'' that gets updated with the selected tag. Defaults to ''tags''. +; actions +: Action widgets to be triggered when the pill is clicked. Within the text, the variable <<.var tag>> contains the title of the selected tag. + +; tagField +: <<.from-version 5.1.23>> The specified ''field'' that gets updated with the selected tag. Defaults to `tags`. + +; tiddler +: <<.from-version 5.3.4>> Defines the target tiddler, which should be manipulated. Defaults to: <<.var currentTiddler>>. + +; tagListFilter +: <<.from-version 5.3.4>> This parameter defaults to: `[tags[]]` which creates a list of all existing tags. If the tag list should come from a different source the filter should look similar to eg: `[get[field-name]enlist-input[]]`. + <<.macro-examples "tag-picker">> diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request Example Basic Authentication.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request Example Basic Authentication.tid new file mode 100644 index 000000000..e16428d4a --- /dev/null +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request Example Basic Authentication.tid @@ -0,0 +1,34 @@ +title: WidgetMessage: tm-http-request Example - Basic Authentication +tags: $:/tags/Global + + +!! HTTP Basic Authentication + +[[HTTP Basic Authentication|https://en.wikipedia.org/wiki/Basic_access_authentication]] is a simple scheme for HTTP clients pass a username and password to an HTTP server. + +The credentials are passed via the "Authorization" header as the string "Basic " (note the space) followed by the base64-encoded username and password joined with a colon. + +Here is a simple, illustrative example: + +``` +\procedure get-tiddler-list-from-tiddlywiki-server(url,username,password) + \procedure completion-get-json() + \import [subfilter{$:/core/config/GlobalImportFilter}] + <$action-log msg="In completion-get-json"/> + <$action-log/> + \end completion-get-json + <$action-sendmessage + $message="tm-http-request" + url=<> + method="GET" + header-Authorization={{{ [addsuffix[:]addsuffixencodebase64[]addprefix[Basic ]] }}} + oncompletion=<> + /> +\end get-tiddler-list-from-tiddlywiki-server + +<$button> +<> +Download + +``` + diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request.tid index e370ad72c..d2dd6eed7 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request.tid @@ -51,3 +51,4 @@ Note that the state tiddler $:/state/http-requests contains a number representin * [[Zotero's|https://www.zotero.org/]] API for retrieving reference items: [[WidgetMessage: tm-http-request Example - Zotero]] * [[Random Dog's|https://random.dog/]] API for retrieving random pictures of dogs showing how to retrieve binary data: [[WidgetMessage: tm-http-request Example - Random Dog]] +* Example of using HTTP Basic Authentication: [[WidgetMessage: tm-http-request Example - Basic Authentication]] diff --git a/editions/tw5.com/tiddlers/system/doc-macros.tid b/editions/tw5.com/tiddlers/system/doc-macros.tid index 5f83c75a8..d0574fe5f 100644 --- a/editions/tw5.com/tiddlers/system/doc-macros.tid +++ b/editions/tw5.com/tiddlers/system/doc-macros.tid @@ -1,8 +1,8 @@ +code-body: yes created: 20150117152607000 -modified: 20240229155550000 +modified: 20240317091700545 tags: $:/tags/Macro title: $:/editions/tw5.com/doc-macros -code-body: yes type: text/vnd.tiddlywiki \whitespace trim @@ -165,7 +165,7 @@ This is an example tiddler. See [[Table-of-Contents Macros (Examples)]].
<$button set=<<.state>> setTo="">Hide
- <> + <$transclude $variable="eg" $mode="block"/>
diff --git a/editions/tw5.com/tiddlers/tag-picker Macro (Examples).tid b/editions/tw5.com/tiddlers/tag-picker Macro (Examples).tid new file mode 100644 index 000000000..1fc150dcc --- /dev/null +++ b/editions/tw5.com/tiddlers/tag-picker Macro (Examples).tid @@ -0,0 +1,69 @@ +created: 20230616104546608 +modified: 20240214174032498 +tags: [[tag-picker Macro]] [[Macro Examples]] +title: tag-picker Macro (Examples) +type: text/vnd.tiddlywiki + +<<.warning """The first example will set the tag of the <<.tid currentTiddler>> so you should copy / paste it to a new tiddler for testing. Otherwise you'll change "this tiddler" """>> + +<$macrocall $name=".example" n="1" +eg="""Use all existing tags and set the ''tags'' field here: <> +"""/> + +---- + +<$let transclusion=test> + +<<.tip """The following examples use a temporary tiddler: $:/temp/test/tag-picker. So this tiddler will not be changed """>> + + +<$macrocall $name=".example" n="2" +eg="""$:/temp/test/tag-picker ''tags'': <$text text={{{ [[$:/temp/test/tag-picker]get[tags]enlist-input[]join[, ]else[n/a]] }}}/> + +Use all existing tags and set the $:/temp/test/tag-picker ''tags'' field: <> +"""/> + +---- + +<<.tip """Use the following example to populate the $:/temp/test/tag-picker ''foo''-field, which are needed by some examples below """>> + +<$macrocall $name=".example" n="3" +eg="""$:/temp/test/tag-picker ''foo'': <$text text={{{ [[$:/temp/test/tag-picker]get[foo]enlist-input[]join[, ]else[n/a]] }}}/> + +Use all existing tags and set the $:/temp/test/tag-picker ''foo'' field: <> +"""/> + +---- + +<<.tip """The following example expects some values in the "foo" field of the tiddler $:/temp/test/tag-picker, which can be created by the example above.""">> + +<$macrocall $name=".example" n="4" eg="""\procedure listSource() $:/temp/test/tag-picker + +$:/temp/test/tag-picker foo: <$text text={{{ [[$:/temp/test/tag-picker]get[foo]enlist-input[]join[, ]else[n/a]] }}}/>
+$:/temp/test/tag-picker bar: <$text text={{{ [[$:/temp/test/tag-picker]get[bar]enlist-input[]join[, ]else[n/a]] }}}/> + +Use $:/temp/test/tag-picker ''foo'' field as source and set ''bar'': <get[foo]enlist-input[]]" tiddler:"$:/temp/test/tag-picker">> +"""/> + +---- + +<<.tip """The following example expects some values in the "foo" field of the tiddler $:/temp/test/tag-picker, which can be created by the example above.
+It will also add completely new tags to the bar-field and the source tiddlers foo-field. New tags can be entered by typing into the tag-name input +""">> + +<$macrocall $name=".example" n="5" eg=""" +\procedure listSource() $:/temp/test/tag-picker +\procedure listSourceField() foo + +\procedure addNewTagToSource() + <$action-listops $tiddler=<> $field=<> $subfilter='[getenlist-input[]] [trim[]]'/> +\end + +$:/temp/test/tag-picker foo: <$text text={{{ [[$:/temp/test/tag-picker]get[foo]enlist-input[]join[, ]else[n/a]] }}}/>
+$:/temp/test/tag-picker ''bar'': <$text text={{{ [[$:/temp/test/tag-picker]get[bar]enlist-input[]join[, ]else[n/a]] }}}/> + +Use $:/temp/test/tag-picker ''foo'' field as source and set ''bar'': <$macrocall $name="tag-picker" tagField="bar" tagListFilter="[getenlist-input[]]" tiddler="$:/temp/test/tag-picker" actions=<>/> + +"""/> + + \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/widgets/Widgets.tid b/editions/tw5.com/tiddlers/widgets/Widgets.tid index 5b682766f..66793f47d 100644 --- a/editions/tw5.com/tiddlers/widgets/Widgets.tid +++ b/editions/tw5.com/tiddlers/widgets/Widgets.tid @@ -1,14 +1,14 @@ created: 20140908130500000 -modified: 20150219182745000 +modified: 20240326164134356 tags: Concepts Reference title: Widgets type: text/vnd.tiddlywiki ~TiddlyWiki's display is driven by an underlying collection of <<.def widgets>>. These are organised into a tree structure: each widget has a parent widget and zero or more child widgets. -~TiddlyWiki generates this <<.def "widget tree">> by parsing the WikiText of tiddlers. Each component of the WikiText syntax, including even the trivial case of ordinary text, generates a corresponding widget. The widget tree is an intermediate representation that is subsequently rendered into the actual display. +~TiddlyWiki generates this <<.def "widget tree">> by parsing the ~WikiText of tiddlers. Each component of the ~WikiText syntax, including even the trivial case of ordinary text, generates a corresponding widget. The widget tree is an intermediate representation that is subsequently rendered into the actual display. -Widgets are analogous to elements in an HTML document. Indeed, HTML tags in WikiText generate dedicated <<.def "element widgets">>. +Widgets are analogous to elements in an HTML document. Indeed, HTML tags in ~WikiText generate dedicated <<.def "element widgets">>. Each class of widget contributes a specific ability to the overall functionality, such as the ability to <<.wlink2 "display an image" ImageWidget>> or <<.wlink2 "a button" ButtonWidget>>, to <<.wlink2 "call a macro" MacroCallWidget>> or <<.wlink2 "transclude text from elsewhere" TranscludeWidget>>, or to [[mark a piece of text as a heading|HTML in WikiText]]. @@ -16,4 +16,4 @@ The more specialised widgets use a general-purpose [[widget syntax|Widgets in Wi The following classes of widget are built into the core: -<> +<> diff --git a/licenses/cla-individual.md b/licenses/cla-individual.md index 3dafcf352..5db3cddfc 100644 --- a/licenses/cla-individual.md +++ b/licenses/cla-individual.md @@ -563,3 +563,5 @@ John Long, @drevarr, 2023/12/12 Ed Holsinger, @eschlon, 2024/02/08 Kim I. McKinley, @PotOfCoffee2Go, 2024/03/16 + +@Jinix6, 2024/03/31 \ No newline at end of file diff --git a/plugins/tiddlywiki/github-fork-ribbon/readme.tid b/plugins/tiddlywiki/github-fork-ribbon/readme.tid index 95d0f7095..4707aaa6b 100644 --- a/plugins/tiddlywiki/github-fork-ribbon/readme.tid +++ b/plugins/tiddlywiki/github-fork-ribbon/readme.tid @@ -4,8 +4,6 @@ This plugin provides a diagonal ribbon across the corner of the window. It resem The ribbon can be positioned over any corner, and can incorporate user defined text, colours and a link. -The CSS stylesheet is adapted from work by Simon Whitaker: +The CSS stylesheet is adapted from work by [[Simon Whitaker|https://github.com/simonwhitaker/github-fork-ribbon-css/]] -https://github.com/simonwhitaker/github-fork-ribbon-css/ - -[[Source code|https://github.com/Jermolene/TiddlyWiki5/blob/master/plugins/tiddlywiki/github-fork-ribbon]] +[[Plugin source code|https://github.com/Jermolene/TiddlyWiki5/blob/master/plugins/tiddlywiki/github-fork-ribbon]] diff --git a/plugins/tiddlywiki/github-fork-ribbon/styles.tid b/plugins/tiddlywiki/github-fork-ribbon/styles.tid index 66bddbc7e..d22e28ac2 100644 --- a/plugins/tiddlywiki/github-fork-ribbon/styles.tid +++ b/plugins/tiddlywiki/github-fork-ribbon/styles.tid @@ -1,5 +1,4 @@ title: $:/plugins/tiddlywiki/github-fork-ribbon/styles -tags: [[$:/tags/Stylesheet]] /* Left will inherit from right (so we don't need to duplicate code */ .github-fork-ribbon { @@ -10,7 +9,7 @@ tags: [[$:/tags/Stylesheet]] padding: 2px 0; /* Set the base colour */ - background-color: #a00; + background-color: <>; /* Set a gradient: transparent black at the top to almost-transparent black at the bottom */ background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.00)), to(rgba(0, 0, 0, 0.15))); @@ -25,7 +24,7 @@ tags: [[$:/tags/Stylesheet]] -webkit-box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.5); box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.5); - z-index: 999; + z-index: 700; pointer-events: auto; } @@ -61,8 +60,8 @@ tags: [[$:/tags/Stylesheet]] height: 150px; position: absolute; overflow: hidden; - top: 0; - z-index: 999; + top: <>; + z-index: 700; pointer-events: none; } @@ -71,25 +70,25 @@ tags: [[$:/tags/Stylesheet]] } .github-fork-ribbon-wrapper.left { - left: 0; + left: <>; } .github-fork-ribbon-wrapper.right { - right: 0; + right: <>; } .github-fork-ribbon-wrapper.left-bottom { position: fixed; top: inherit; - bottom: 0; - left: 0; + bottom: <>; + left: <>; } .github-fork-ribbon-wrapper.right-bottom { position: fixed; top: inherit; - bottom: 0; - right: 0; + bottom: <>; + right: <>; } .github-fork-ribbon-wrapper.right .github-fork-ribbon { diff --git a/plugins/tiddlywiki/github-fork-ribbon/template.tid b/plugins/tiddlywiki/github-fork-ribbon/template.tid new file mode 100644 index 000000000..22cee156d --- /dev/null +++ b/plugins/tiddlywiki/github-fork-ribbon/template.tid @@ -0,0 +1,26 @@ +title: $:/plugins/tiddlywiki/github-fork-ribbon/template + + +\parameters (position:"right", url:"https://github.com/Jermolene/TiddlyWiki5", text:"Fork me on ~GitHub" color:"#aa0000" top:"0" bottom:"0" left:"0" right:"0" fixed:"") + + + +
] [] +[join[ ]] }}}> + +
diff --git a/plugins/tiddlywiki/github-fork-ribbon/usage.tid b/plugins/tiddlywiki/github-fork-ribbon/usage.tid index c6d5311e0..aea2e3dba 100644 --- a/plugins/tiddlywiki/github-fork-ribbon/usage.tid +++ b/plugins/tiddlywiki/github-fork-ribbon/usage.tid @@ -1,26 +1,81 @@ title: $:/plugins/tiddlywiki/github-fork-ribbon/usage -Copy appropriate chunks on a new tiddler and tag it `$:/tags/PageControls`. Name of the new tiddler does not matter. Only the tag matters. +\procedure ribbonCode() +\whitespace trim +<$transclude $tiddler="$:/plugins/tiddlywiki/github-fork-ribbon/template" top="30px" fixed=fixed color="green"/> +\end -``` - - - +\procedure ribbonCreateActions() +<% if [[$:/github-ribbon]!is[tiddler]] %> + <$action-setfield $tiddler="$:/github-ribbon" $field="text" $value=<> + tags="$:/tags/PageTemplate" + code-body="yes" /> +<% endif %> +<$action-navigate $to="$:/github-ribbon" /> +\end - - - +\procedure createRibbon() +<$button actions=<> > +<%if [[$:/github-ribbon]!is[tiddler]] %> +Create +<% else %> +Show +<% endif %> ~$:/github-ribbon + +\end + +\procedure ribbonToggleTagActions() +<$action-listops $tiddler="$:/github-ribbon" $field="tags" $subfilter="+[toggle[$:/tags/PageTemplate]]" /> +\end + +\procedure ribbonToggleTag() <$button actions=<> >Toggle Tag - - - +`$:/plugins/tiddlywiki/github-fork-ribbon/template` is a template tiddler, that can be used with a transclusion and parameters. - - - -``` +!! Usage + +* Create a new tiddler eg: $:/github-ribbon +* Tag it `$:/tags/PageTemplate` +* Copy the code below + +
<$text text=<>/>
+ +<> <> + +!! Parameters + +; position +: "right" (default), "left", "right-bottom" and "left-bottom" + +; url +: Target URL, default: https://github.com/Jermolene/TiddlyWiki5 + +; text +: Ribbon text. default: `Fork me on ~GitHub` + +; color +: Ribbon background color: default: `#aa0000` + +; top +: Offset from the top if postion is top. default: `0` eg: `30px`, if the menu-toolbar plugin is installed + +; bottom +: Offset from the bottom in px + +; left +: Offset from the left in px + +; right +: Offset from the right in px + +; fixed +: If position is ''top'', the ribbon will scroll out of the viewport by default +: If the parameter `fixed="fixed"` it will be fixed + +!! Remove the Ribbon + +* Disable the plugin +* ''Remove the tag'' from $:/github-ribbon tiddler +* Delete the $:/github-ribbon tiddler +* <> \ No newline at end of file diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index 1ca85c6a7..69ba8e680 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -931,6 +931,7 @@ button.tc-btn-invisible.tc-remove-tag-button { .tc-page-controls { margin-top: 14px; + margin-bottom: 14px; font-size: 1.5em; } @@ -1335,6 +1336,7 @@ canvas.tc-edit-bitmapeditor { clear: both; } +.tc-single-tiddler-window .tc-tiddler-body, .tc-tiddler-frame .tc-tiddler-body { font-size: {{$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize}}; line-height: {{$:/themes/tiddlywiki/vanilla/metrics/bodylineheight}}; @@ -1344,6 +1346,11 @@ canvas.tc-edit-bitmapeditor { overflow: hidden; /* https://github.com/Jermolene/TiddlyWiki5/issues/282 */ } +/* +* Tiddler in a new window. +* Also see: .tc-single-tiddler-window .tc-tiddler-body, above +*/ + html body.tc-body.tc-single-tiddler-window { margin: 1em; background: <>; diff --git a/themes/tiddlywiki/vanilla/reset.tid b/themes/tiddlywiki/vanilla/reset.tid index 0f7d24eab..938ecc7b1 100644 --- a/themes/tiddlywiki/vanilla/reset.tid +++ b/themes/tiddlywiki/vanilla/reset.tid @@ -1,7 +1,7 @@ title: $:/themes/tiddlywiki/vanilla/reset type: text/css -/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */ +/*! modern-normalize v2.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */ /* Document @@ -13,28 +13,26 @@ Use a better box model (opinionated). */ *, -*::before, -*::after { - box-sizing: border-box; +::before, +::after { + box-sizing: border-box; } -/** -Use a more readable tab size (opinionated). -*/ - -:root { - -moz-tab-size: 4; - tab-size: 4; -} - -/** -1. Correct the line height in all browsers. -2. Prevent adjustments of font size after orientation changes in iOS. -*/ - html { - line-height: 1.15; /* 1 */ - -webkit-text-size-adjust: 100%; /* 2 */ + /* Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3) */ + font-family: + system-ui, + 'Segoe UI', + Roboto, + Helvetica, + Arial, + sans-serif, + 'Apple Color Emoji', + 'Segoe UI Emoji'; + line-height: 1.15; /* 1. Correct the line height in all browsers. */ + -webkit-text-size-adjust: 100%; /* 2. Prevent adjustments of font size after orientation changes in iOS. */ + -moz-tab-size: 4; /* 3. Use a more readable tab size (opinionated). */ + tab-size: 4; /* 3 */ } /* @@ -42,29 +40,8 @@ Sections ======== */ -/** -Remove the margin in all browsers. -*/ - body { - margin: 0; -} - -/** -Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3) -*/ - -body { - font-family: - system-ui, - -apple-system, /* Firefox supports this but not yet `system-ui` */ - 'Segoe UI', - Roboto, - Helvetica, - Arial, - sans-serif, - 'Apple Color Emoji', - 'Segoe UI Emoji'; + margin: 0; /* Remove the margin in all browsers. */ } /* @@ -78,8 +55,8 @@ Grouping content */ hr { - height: 0; /* 1 */ - color: inherit; /* 2 */ + height: 0; /* 1 */ + color: inherit; /* 2 */ } /* @@ -92,7 +69,7 @@ Add the correct text decoration in Chrome, Edge, and Safari. */ abbr[title] { - text-decoration: underline dotted; + text-decoration: underline dotted; } /** @@ -101,7 +78,7 @@ Add the correct font weight in Edge and Safari. b, strong { - font-weight: bolder; + font-weight: bolder; } /** @@ -113,14 +90,14 @@ code, kbd, samp, pre { - font-family: - ui-monospace, - SFMono-Regular, - Consolas, - 'Liberation Mono', - Menlo, - monospace; /* 1 */ - font-size: 1em; /* 2 */ + font-family: + ui-monospace, + SFMono-Regular, + Consolas, + 'Liberation Mono', + Menlo, + monospace; /* 1 */ + font-size: 1em; /* 2 */ } /** @@ -128,7 +105,7 @@ Add the correct font size in all browsers. */ small { - font-size: 80%; + font-size: 80%; } /** @@ -137,18 +114,18 @@ Prevent 'sub' and 'sup' elements from affecting the line height in all browsers. sub, sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; } sub { - bottom: -0.25em; + bottom: -0.25em; } sup { - top: -0.5em; + top: -0.5em; } /* @@ -158,12 +135,12 @@ Tabular data /** 1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) -2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) +2. Correct table border color inheritance in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) */ table { - text-indent: 0; /* 1 */ - border-color: inherit; /* 2 */ + text-indent: 0; /* 1 */ + border-color: inherit; /* 2 */ } /* @@ -181,20 +158,19 @@ input, optgroup, select, textarea { - font-family: inherit; /* 1 */ - font-size: 100%; /* 1 */ - line-height: 1.15; /* 1 */ - margin: 0; /* 2 */ + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ } /** Remove the inheritance of text transform in Edge and Firefox. -1. Remove the inheritance of text transform in Firefox. */ button, -select { /* 1 */ - text-transform: none; +select { + text-transform: none; } /** @@ -205,7 +181,7 @@ button, [type='button'], [type='reset'], [type='submit'] { - -webkit-appearance: button; + -webkit-appearance: button; } /** @@ -213,8 +189,8 @@ Remove the inner border and padding in Firefox. */ ::-moz-focus-inner { - border-style: none; - padding: 0; + border-style: none; + padding: 0; } /** @@ -222,7 +198,7 @@ Restore the focus styles unset by the previous rule. */ :-moz-focusring { - outline: 1px dotted ButtonText; + outline: 1px dotted ButtonText; } /** @@ -231,7 +207,7 @@ See: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d4 */ :-moz-ui-invalid { - box-shadow: none; + box-shadow: none; } /** @@ -239,7 +215,7 @@ Remove the padding so developers are not caught out when they zero out 'fieldset */ legend { - padding: 0; + padding: 0; } /** @@ -247,7 +223,7 @@ Add the correct vertical alignment in Chrome and Firefox. */ progress { - vertical-align: baseline; + vertical-align: baseline; } /** @@ -256,7 +232,7 @@ Correct the cursor style of increment and decrement buttons in Safari. ::-webkit-inner-spin-button, ::-webkit-outer-spin-button { - height: auto; + height: auto; } /** @@ -265,8 +241,8 @@ Correct the cursor style of increment and decrement buttons in Safari. */ [type='search'] { - -webkit-appearance: textfield; /* 1 */ - outline-offset: -2px; /* 2 */ + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ } /** @@ -274,7 +250,7 @@ Remove the inner padding in Chrome and Safari on macOS. */ ::-webkit-search-decoration { - -webkit-appearance: none; + -webkit-appearance: none; } /** @@ -283,8 +259,8 @@ Remove the inner padding in Chrome and Safari on macOS. */ ::-webkit-file-upload-button { - -webkit-appearance: button; /* 1 */ - font: inherit; /* 2 */ + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ } /* @@ -297,5 +273,5 @@ Add the correct display in Chrome and Safari. */ summary { - display: list-item; + display: list-item; }