cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <html class="win-hoverable">
<head>
    <title>WinJS: SplitView and XYFocus</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="UTF-8">
</head>
<body class="win-type-body">
<div id="content">
    <div id="app">
        <div class="splitView win-splitview win-disposable win-splitview-placementleft win-splitview-closeddisplayinline win-splitview-openeddisplayoverlay win-splitview-pane-closed"
             data-win-control="WinJS.UI.SplitView" 
             id="element__1">
                <div class="win-splitview-pane" 
                     tabindex="-1">
                    <!-- Pane area -->
                    <div>
                        <div class="header">
                            <button tabindex="1" 
                                    class="win-splitviewpanetoggle start"
                                    data-win-control="WinJS.UI.SplitViewPaneToggle"
                                    data-win-options="{ splitView: select('.splitView') }" 
                                    type="button"></button>
                            <div class="title" style="padding-left: 10px;">SplitView Pane area</div>
                        </div>

                        <div class="nav-commands">
                            <div tabindex="2" 
                                 data-win-control="WinJS.UI.SplitViewCommand"
                                 data-win-options="{ label: 'Home', icon: 'home'}">
                            </div>
                            <div tabindex="3" 
                                 data-win-control="WinJS.UI.SplitViewCommand"
                                 data-win-options="{ label: 'Favorite', icon: 'favorite'}"
                                 class="win-navbarcommand win-disposable">
                            </div>
                            <div tabindex="4" 
                                 data-win-control="WinJS.UI.SplitViewCommand "
                                 data-win-options="{ label: 'Settings', icon: 'settings'}"
                                 class="win-navbarcommand win-disposable">
                            </div>
                        </div>

                    </div>
                </div>
            </div>
            <div class="win-splitview-contentwrapper" 
                 style="position: absolute; top: 0px; margin-left: 50px;">
                <div class="win-splitview-content">
                    <!-- Content area -->
                    <div class="contenttext">
                      <h2 class="win-h2">SplitView Content area</h2>
                      
                      <table>
                        <tr>
                            <td class="verticalstacking">
                                <div id="splitViewFocusToggle" 
                                     data-win-control="WinJS.UI.ToggleSwitch" 
                                     data-win-options="{title: 'SplitView Toggle Button Default Focus (XYFocus)', checked: false, onchange: toggleSplitViewFocus}">
                                </div>
                            </td>
                        </tr>
                      </table>             
                      <p>Use the keyboard arrows to navigate the menu.</p>
                      <p>Press enter when SplitView toggle button acquires focus</p>
                      <p>The toggle on/off button activates the focus on the SplitView toggle button</p>
                    </div>
                </div>
            </div>
        </div>

    </div>


</div>

</body>
</html>
            
          
!
            
              /* CSS needs to clean up */

.content {
    /* Enables scrolling and disables margin collapsing between #content and its descendants */
    overflow: auto;

    height: 100%;
}
body {
    overflow: hidden; /* Disable margin collapsing between body and its descendants */
    -webkit-transform: translate3d(0, 0, 0); /*force hardware acceleration*/
}

.box { padding: 8px; }

::-webkit-scrollbar {
    background-color:transparent;
}

::-webkit-scrollbar-thumb
{
    border:1px solid rgba(220,220,220, 0.3);
}

.win-searchbox ::-webkit-scrollbar 
{
    background-color:white;
}

.win-searchbox ::-webkit-scrollbar-thumb
{
    border:1px solid gray;
    background-color:silver;
}

a, a:visited, a:hover, a:active {
    cursor:pointer;
    color: rgba(212, 14, 136, 1);
}

.win-listview .win-viewport { 
    -webkit-overflow-scrolling: touch; 
}

.win-listview .win-itemsblock,
.win-listview .win-vertical .win-itemscontainer,
.win-listview .win-vertical .win-itemsblock:not(.win-clip) {
        margin:0;
        padding:0;
}

.win-link,
.win-progress-bar,
.win-progress-ring,
.win-ring {
  color: rgb(0, 120, 215);
}
::selection,
.win-button.win-button-primary,
.win-dropdown option:checked,
select[multiple].win-dropdown option:checked {
  background-color: rgb(0, 120, 215);
}
.win-textbox:focus,
.win-textarea:focus,
.win-textbox:focus:hover,
.win-textarea:focus:hover {
  border-color: rgb(0, 120, 215);
}
.win-textbox::-ms-clear:hover:not(:active),
.win-textbox::-ms-reveal:hover:not(:active) {
  color: rgb(0, 120, 215);
}
.win-checkbox:checked::-ms-check,
.win-textbox::-ms-clear:active,
.win-textbox::-ms-reveal:active {
  background-color: rgb(0, 120, 215);
}
.win-progress-bar::-webkit-progress-value,
.win-progress-ring::-webkit-progress-value,
.win-ring::-webkit-progress-value {
  background-color: rgb(0, 120, 215);
}
.win-progress-bar:not(:indeterminate)::-moz-progress-bar,
.win-progress-ring:not(:indeterminate)::-moz-progress-bar,
.win-ring:not(:indeterminate)::-moz-progress-bar {
  background-color: rgb(0, 120, 215);
}
.win-checkbox:indeterminate::-ms-check,
.win-checkbox:hover:indeterminate::-ms-check,
.win-radio:checked::-ms-check {
  border-color: rgb(0, 120, 215);
}
.win-slider::-ms-thumb,
.win-slider::-ms-fill-lower {
  background: rgb(0, 120, 215);
}
.win-slider::-webkit-slider-thumb {
  background: rgb(0, 120, 215);
}
.win-slider::-moz-range-thumb {
  background: rgb(0, 120, 215);
}
.win-listview:not(.win-selectionstylefilled) .win-selectioncheckmarkbackground,
.win-itemcontainer:not(.win-selectionstylefilled) .win-selectioncheckmarkbackground {
  border-color: rgb(0, 120, 215);
  background-color: rgb(0, 120, 215);
}
.win-listview:not(.win-selectionstylefilled) .win-container.win-selected .win-selectionborder,
.win-itemcontainer:not(.win-selectionstylefilled).win-container.win-selected .win-selectionborder {
  border-color: rgb(0, 120, 215);
}
.win-listview.win-selectionstylefilled .win-selected .win-selectionbackground,
.win-itemcontainer.win-selectionstylefilled.win-selected .win-selectionbackground {
  background-color: rgb(0, 120, 215);
}
.win-rating .win-star.win-user.win-full,
.win-rating .win-star.win-user.win-full.win-disabled {
  color: rgb(0, 120, 215);
}
.win-toggleswitch-on .win-toggleswitch-track {
  border-color: rgb(0, 120, 215);
}
.win-semanticzoom-zoomedoutview .win-hub-section-header-interactive .win-hub-section-header-content,
.win-hub-section-header-interactive .win-hub-section-header-chevron {
  color: rgb(0, 120, 215);
}
button[aria-checked=true].win-command:before,
.win-menu-containsflyoutcommand button.win-command-flyout-activated:before {
  background-color: rgb(0, 120, 215);
  border-color: rgb(0, 120, 215);
}
.win-flyout,
.win-settingsflyout {
  border-color: rgb(0, 120, 215);
}
html.win-hoverable .win-autosuggestbox .win-autosuggestbox-suggestion-selected:hover {
  background-color: rgba(0, 120, 215, 0.8);
}
html.win-hoverable .win-ui-light .win-autosuggestbox .win-autosuggestbox-suggestion-selected:hover,
html.win-hoverable .win-ui-light.win-autosuggestbox .win-autosuggestbox-suggestion-selected:hover {
  background-color: rgba(0, 120, 215, 0.6);
}
.win-autosuggestbox .win-autosuggestbox-suggestion-selected {
  background-color: rgba(0, 120, 215, 0.6);
}
.win-ui-light .win-autosuggestbox .win-autosuggestbox-suggestion-selected,
.win-ui-light.win-autosuggestbox .win-autosuggestbox-suggestion-selected {
  background-color: rgba(0, 120, 215, 0.4);
}
.win-autosuggestbox .win-autosuggestbox-suggestion-selected.win-autosuggestbox-suggestion-selected:hover:active {
  background-color: rgba(0, 120, 215, 0.9);
}
.win-ui-light .win-autosuggestbox .win-autosuggestbox-suggestion-selected.win-autosuggestbox-suggestion-selected:hover:active,
.win-ui-light.win-autosuggestbox .win-autosuggestbox-suggestion-selected.win-autosuggestbox-suggestion-selected:hover:active {
  background-color: rgba(0, 120, 215, 0.7);
}
html.win-hoverable .win-searchbox-button:not(.win-searchbox-button-disabled):hover {
  color: rgb(0, 120, 215);
}
.win-searchbox-button.win-searchbox-button:not(.win-searchbox-button-disabled):hover:active {
  background-color: rgb(0, 120, 215);
}
html.win-hoverable .win-navbarcommand-splitbutton.win-navbarcommand-splitbutton-opened:hover {
  background-color: rgba(0, 120, 215, 0.8);
}
html.win-hoverable .win-ui-light .win-navbarcommand-splitbutton.win-navbarcommand-splitbutton-opened:hover,
html.win-hoverable .win-ui-light.win-navbarcommand-splitbutton.win-navbarcommand-splitbutton-opened:hover {
  background-color: rgba(0, 120, 215, 0.6);
}
html.win-hoverable .win-navbarcommand-splitbutton.win-navbarcommand-splitbutton-opened:hover.win-pressed {
  background-color: rgba(0, 120, 215, 0.9);
}
html.win-hoverable .win-ui-light .win-navbarcommand-splitbutton.win-navbarcommand-splitbutton-opened:hover.win-pressed,
html.win-hoverable .win-ui-light.win-navbarcommand-splitbutton.win-navbarcommand-splitbutton-opened:hover.win-pressed {
  background-color: rgba(0, 120, 215, 0.7);
}
.win-navbarcommand-splitbutton.win-navbarcommand-splitbutton-opened {
  background-color: rgba(0, 120, 215, 0.6);
}
.win-ui-light .win-navbarcommand-splitbutton.win-navbarcommand-splitbutton-opened,
.win-ui-light.win-navbarcommand-splitbutton.win-navbarcommand-splitbutton-opened {
  background-color: rgba(0, 120, 215, 0.4);
}
.win-navbarcommand-splitbutton.win-navbarcommand-splitbutton-opened.win-pressed {
  background-color: rgba(0, 120, 215, 0.9);
}
.win-ui-light .win-navbarcommand-splitbutton.win-navbarcommand-splitbutton-opened.win-pressed,
.win-ui-light.win-navbarcommand-splitbutton.win-navbarcommand-splitbutton-opened.win-pressed {
  background-color: rgba(0, 120, 215, 0.7);
}
.win-contentdialog-dialog {
  outline-color: rgb(0, 120, 215);
}
/***/
.content,
#app {
    height: 100%;
}

    #app .win-splitviewpanetoggle {
        float: left;
    }

    /* SplitView pane content style*/
    #app .header {
        white-space: nowrap;
    }
    
    #app .header > button:focus{
        background: blue;
    }

    #app .title {
        font-size: 25px;
        left: 50px;
        margin-top: 6px;
        vertical-align: middle;
        display: inline-block;
    }

    #app .nav-commands {
        margin-top: 20px;
    }
    
    #app .nav-commands > div:focus{
        background: blue;
    }

.win-navbarcommand-button {
    background-color: transparent;
}

#app .win-splitview-pane-hidden .win-navbarcommand-button {
    width: 46px;
}

#app .win-splitview-pane-hidden .win-navbarcommand-label {
    /* Workaround: Make sure pane doesn't scroll if ContentDialog restores focus to
       NavBarCommand's label
    */
    visibility: hidden;
}

/*SplitView content style*/
#app .win-splitview-content {
    background-color: rgb(112,112,112);
}

#app .contenttext {
    margin-left: 20px;
    margin-top: 6px;
}

@font-face {
    font-family: 'wf_segoe-ui_light';
    src: url('https://winjs.azurewebsites.net/i.s-microsoft.com/fonts/segoe-ui/west-european/light/latest.eot');
    src: url('https://winjs.azurewebsites.net/i.s-microsoft.com/fonts/segoe-ui/west-european/light/latest.eot?#iefix') format('embedded-opentype'),url('https://winjs.azurewebsites.net/i.s-microsoft.com/fonts/segoe-ui/west-european/light/latest.woff') format('woff'),url('https://winjs.azurewebsites.net/i.s-microsoft.com/fonts/segoe-ui/west-european/light/latest.ttf') format('truetype'),url('https://winjs.azurewebsites.net/i.s-microsoft.com/fonts/segoe-ui/west-european/light/latest.svg#web') format('svg');
    font-weight: normal;
    font-style: normal;
}

#content {
    /* Enables scrolling and disables margin collapsing between #content and its descendants */
    overflow: auto;

    height: 100%;
}
body {
    overflow: hidden; /* Disable margin collapsing between body and its descendants */
    -webkit-transform: translate3d(0, 0, 0); /*force hardware acceleration*/
}

.box { padding: 8px; }

::-webkit-scrollbar {
    background-color:transparent;
}

::-webkit-scrollbar-thumb
{
    border:1px solid rgba(220,220,220, 0.3);
}

.win-searchbox ::-webkit-scrollbar 
{
    background-color:white;
}

.win-searchbox ::-webkit-scrollbar-thumb
{
    border:1px solid gray;
    background-color:silver;
}

a, a:visited, a:hover, a:active {
    cursor:pointer;
    color: rgba(212, 14, 136, 1);
}

.win-listview .win-viewport { 
    -webkit-overflow-scrolling: touch; 
}

.win-listview .win-itemsblock,
.win-listview .win-vertical .win-itemscontainer,
.win-listview .win-vertical .win-itemsblock:not(.win-clip) {
        margin:0;
        padding:0;
}
.contenttext{
  color: white;
}
            
          
!
            
              (function() {
  // Wire XYFocus up to the arrow keys
  WinJS.UI.XYFocus.keyCodeMap.up.push(WinJS.Utilities.Key.upArrow);
  WinJS.UI.XYFocus.keyCodeMap.down.push(WinJS.Utilities.Key.downArrow);
  WinJS.UI.XYFocus.keyCodeMap.left.push(WinJS.Utilities.Key.leftArrow);
  WinJS.UI.XYFocus.keyCodeMap.right.push(WinJS.Utilities.Key.rightArrow);

  WinJS.UI.processAll().done(function () {

      var splitView = document.querySelector(".splitView").winControl;
      new WinJS.UI._WinKeyboard(splitView.paneElement); // Temporary workaround: Draw keyboard focus visuals on NavBarCommands

      var startItem = document.querySelector('.start');
    
      var toggleSplitViewFocus = function() {
          var obj = document.getElementById("splitViewFocusToggle").winControl;
          console.log("SplitView Button Focus toggled. Current status: " + (obj.checked ? "on" : "off"));
          if (obj.checked){
            startItem.focus();    
          }else{
            startItem.blur();    
          }
      }

      var splitViewFocusToggle = document.querySelector("#splitViewFocusToggle");
      splitViewFocusToggle.addEventListener("change", toggleSplitViewFocus);
      
     
    
     
  });
  
})();
            
          
!
999px
Loading ..................

Console